gfx/skia/trunk/src/animator/SkBoundable.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.

     2 /*
     3  * Copyright 2006 The Android Open Source Project
     4  *
     5  * Use of this source code is governed by a BSD-style license that can be
     6  * found in the LICENSE file.
     7  */
    10 #ifndef SkBoundable_DEFINED
    11 #define SkBoundable_DEFINED
    13 #include "SkDrawable.h"
    14 #include "SkRect.h"
    16 class SkBoundable : public SkDrawable {
    17 public:
    18     SkBoundable();
    19     virtual void clearBounder();
    20     virtual void enableBounder();
    21     virtual void getBounds(SkRect* );
    22     bool hasBounds() { return fBounds.fLeft != (int16_t)0x8000U; }
    23     void setBounds(SkIRect& bounds) { fBounds = bounds; }
    24 protected:
    25     void clearBounds() { fBounds.fLeft = (int16_t) SkToU16(0x8000); }; // mark bounds as unset
    26     SkIRect fBounds;
    27 private:
    28     typedef SkDrawable INHERITED;
    29 };
    31 class SkBoundableAuto {
    32 public:
    33     SkBoundableAuto(SkBoundable* boundable, SkAnimateMaker& maker);
    34     ~SkBoundableAuto();
    35 private:
    36     SkBoundable* fBoundable;
    37     SkAnimateMaker& fMaker;
    38     SkBoundableAuto& operator= (const SkBoundableAuto& );
    39 };
    41 #endif // SkBoundable_DEFINED

mercurial