Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | |
michael@0 | 2 | /* |
michael@0 | 3 | * Copyright 2006 The Android Open Source Project |
michael@0 | 4 | * |
michael@0 | 5 | * Use of this source code is governed by a BSD-style license that can be |
michael@0 | 6 | * found in the LICENSE file. |
michael@0 | 7 | */ |
michael@0 | 8 | |
michael@0 | 9 | |
michael@0 | 10 | #ifndef SkDisplayApply_DEFINED |
michael@0 | 11 | #define SkDisplayApply_DEFINED |
michael@0 | 12 | |
michael@0 | 13 | #include "SkAnimateBase.h" |
michael@0 | 14 | #include "SkDrawable.h" |
michael@0 | 15 | #include "SkIntArray.h" |
michael@0 | 16 | |
michael@0 | 17 | class SkActive; |
michael@0 | 18 | |
michael@0 | 19 | class SkApply : public SkDrawable { |
michael@0 | 20 | DECLARE_MEMBER_INFO(Apply); |
michael@0 | 21 | public: |
michael@0 | 22 | |
michael@0 | 23 | SkApply(); |
michael@0 | 24 | virtual ~SkApply(); |
michael@0 | 25 | |
michael@0 | 26 | enum Transition { |
michael@0 | 27 | kTransition_normal, |
michael@0 | 28 | kTransition_reverse |
michael@0 | 29 | }; |
michael@0 | 30 | |
michael@0 | 31 | enum Mode { |
michael@0 | 32 | kMode_create, |
michael@0 | 33 | kMode_immediate, |
michael@0 | 34 | //kMode_once |
michael@0 | 35 | }; |
michael@0 | 36 | void activate(SkAnimateMaker& ); |
michael@0 | 37 | void append(SkApply* apply); |
michael@0 | 38 | void appendActive(SkActive* ); |
michael@0 | 39 | void applyValues(int animatorIndex, SkOperand* values, int count, |
michael@0 | 40 | SkDisplayTypes , SkMSec time); |
michael@0 | 41 | virtual bool contains(SkDisplayable*); |
michael@0 | 42 | // void createActive(SkAnimateMaker& ); |
michael@0 | 43 | virtual SkDisplayable* deepCopy(SkAnimateMaker* ); |
michael@0 | 44 | void disable(); |
michael@0 | 45 | virtual bool draw(SkAnimateMaker& ); |
michael@0 | 46 | #ifdef SK_DUMP_ENABLED |
michael@0 | 47 | virtual void dump(SkAnimateMaker* ); |
michael@0 | 48 | #endif |
michael@0 | 49 | virtual bool enable(SkAnimateMaker& ); |
michael@0 | 50 | void enableCreate(SkAnimateMaker& ); |
michael@0 | 51 | void enableDynamic(SkAnimateMaker& ); |
michael@0 | 52 | void endSave(int index); |
michael@0 | 53 | Mode getMode() { return mode; } |
michael@0 | 54 | virtual bool getProperty(int index, SkScriptValue* value) const; |
michael@0 | 55 | SkDrawable* getScope() { return scope; } |
michael@0 | 56 | void getStep(SkScriptValue* ); |
michael@0 | 57 | SkDrawable* getTarget(SkAnimateBase* ); |
michael@0 | 58 | bool hasDelayedAnimator() const; |
michael@0 | 59 | virtual bool hasEnable() const; |
michael@0 | 60 | bool inactivate(SkAnimateMaker& maker); |
michael@0 | 61 | virtual void initialize(); |
michael@0 | 62 | bool interpolate(SkAnimateMaker& , SkMSec time); |
michael@0 | 63 | virtual void onEndElement(SkAnimateMaker& ); |
michael@0 | 64 | virtual const SkMemberInfo* preferredChild(SkDisplayTypes type); |
michael@0 | 65 | void refresh(SkAnimateMaker& ); |
michael@0 | 66 | void reset(); |
michael@0 | 67 | virtual bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* ); |
michael@0 | 68 | bool resolveField(SkAnimateMaker& , SkDisplayable* parent, SkString* str); |
michael@0 | 69 | void save(int index); |
michael@0 | 70 | void setEmbedded() { fEmbedded = true; } |
michael@0 | 71 | virtual bool setProperty(int index, SkScriptValue& ); |
michael@0 | 72 | virtual void setSteps(int _steps); |
michael@0 | 73 | // virtual void setTime(SkMSec time); |
michael@0 | 74 | #ifdef SK_DEBUG |
michael@0 | 75 | virtual void validate(); |
michael@0 | 76 | #endif |
michael@0 | 77 | private: |
michael@0 | 78 | SkMSec begin; |
michael@0 | 79 | SkBool dontDraw; |
michael@0 | 80 | SkString dynamicScope; |
michael@0 | 81 | SkMSec interval; |
michael@0 | 82 | Mode mode; |
michael@0 | 83 | #if 0 |
michael@0 | 84 | SkBool pickup; |
michael@0 | 85 | #endif |
michael@0 | 86 | SkBool restore; |
michael@0 | 87 | SkDrawable* scope; |
michael@0 | 88 | int32_t steps; |
michael@0 | 89 | Transition transition; |
michael@0 | 90 | SkActive* fActive; |
michael@0 | 91 | SkTDAnimateArray fAnimators; |
michael@0 | 92 | // SkDrawable* fCurrentScope; |
michael@0 | 93 | SkMSec fLastTime; // used only to return script property time |
michael@0 | 94 | SkTDDrawableArray fScopes; |
michael@0 | 95 | SkBool fAppended : 1; |
michael@0 | 96 | SkBool fContainsScope : 1; |
michael@0 | 97 | SkBool fDeleteScope : 1; |
michael@0 | 98 | SkBool fEmbedded : 1; |
michael@0 | 99 | SkBool fEnabled : 1; |
michael@0 | 100 | SkBool fEnabling : 1; // set if calling interpolate from enable |
michael@0 | 101 | friend class SkActive; |
michael@0 | 102 | friend class SkDisplayList; |
michael@0 | 103 | typedef SkDrawable INHERITED; |
michael@0 | 104 | }; |
michael@0 | 105 | |
michael@0 | 106 | #endif // SkDisplayApply_DEFINED |