gfx/skia/trunk/src/animator/SkDisplayEvent.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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 SkDisplayEvent_DEFINED
michael@0 11 #define SkDisplayEvent_DEFINED
michael@0 12
michael@0 13 #include "SkDisplayable.h"
michael@0 14 #include "SkMemberInfo.h"
michael@0 15 #include "SkIntArray.h"
michael@0 16 #include "SkKey.h"
michael@0 17
michael@0 18 class SkEvent;
michael@0 19
michael@0 20 class SkDisplayEvent : public SkDisplayable {
michael@0 21 DECLARE_DISPLAY_MEMBER_INFO(Event);
michael@0 22 enum Kind {
michael@0 23 kNo_kind,
michael@0 24 kKeyChar,
michael@0 25 kKeyPress,
michael@0 26 kKeyPressUp, //i assume the order here is intended to match with skanimatorscript.cpp
michael@0 27 kMouseDown,
michael@0 28 kMouseDrag,
michael@0 29 kMouseMove,
michael@0 30 kMouseUp,
michael@0 31 kOnEnd,
michael@0 32 kOnload,
michael@0 33 kUser
michael@0 34 };
michael@0 35 SkDisplayEvent();
michael@0 36 virtual ~SkDisplayEvent();
michael@0 37 virtual bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE;
michael@0 38 virtual bool contains(SkDisplayable*);
michael@0 39 virtual SkDisplayable* contains(const SkString& );
michael@0 40 #ifdef SK_DEBUG
michael@0 41 void dumpEvent(SkAnimateMaker* );
michael@0 42 #endif
michael@0 43 bool enableEvent(SkAnimateMaker& );
michael@0 44 virtual bool getProperty(int index, SkScriptValue* ) const;
michael@0 45 virtual void onEndElement(SkAnimateMaker& maker);
michael@0 46 void populateInput(SkAnimateMaker& , const SkEvent& fEvent);
michael@0 47 virtual bool setProperty(int index, SkScriptValue& );
michael@0 48 protected:
michael@0 49 SkKey code;
michael@0 50 SkBool disable;
michael@0 51 Kind kind;
michael@0 52 SkString target;
michael@0 53 SkScalar x;
michael@0 54 SkScalar y;
michael@0 55 SkTDDisplayableArray fChildren;
michael@0 56 mutable SkString fKeyString;
michael@0 57 SkKey fLastCode; // last key to trigger this event
michael@0 58 SkKey fMax; // if the code expresses a range
michael@0 59 SkDisplayable* fTarget; // used by onEnd
michael@0 60 private:
michael@0 61 void deleteMembers();
michael@0 62 friend class SkEvents;
michael@0 63 typedef SkDisplayable INHERITED;
michael@0 64 };
michael@0 65
michael@0 66 #endif // SkDisplayEvent_DEFINED

mercurial