gfx/skia/trunk/include/views/SkOSWindow_Mac.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  */
     9 #ifndef SkOSWindow_MacCocoa_DEFINED
    10 #define SkOSWindow_MacCocoa_DEFINED
    12 #include "SkWindow.h"
    14 class SkOSWindow : public SkWindow {
    15 public:
    16     SkOSWindow(void* hwnd);
    17     ~SkOSWindow();
    18     void*   getHWND() const { return fHWND; }
    20     virtual bool onDispatchClick(int x, int y, Click::State state,
    21                                  void* owner, unsigned modi);
    22     enum SkBackEndTypes {
    23         kNone_BackEndType,
    24 #if SK_SUPPORT_GPU
    25         kNativeGL_BackEndType,
    26 #endif
    27     };
    29     struct AttachmentInfo {
    30         int fSampleCount;
    31         int fStencilBits;
    32     };
    34     void    detach();
    35     bool    attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*);
    36     void    present();
    38 protected:
    39     // overrides from SkEventSink
    40     virtual bool onEvent(const SkEvent& evt);
    41     // overrides from SkWindow
    42     virtual void onHandleInval(const SkIRect&);
    43     // overrides from SkView
    44     virtual void onAddMenu(const SkOSMenu*);
    45     virtual void onUpdateMenu(const SkOSMenu*);
    46     virtual void onSetTitle(const char[]);
    48 private:
    49     void*   fHWND;
    50     bool    fInvalEventIsPending;
    51     void*   fNotifier;
    52 #if SK_SUPPORT_GPU
    53     void*   fGLContext;
    54 #endif
    55     typedef SkWindow INHERITED;
    56 };
    58 #endif

mercurial