gfx/skia/trunk/src/views/mac/SkNSView.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 2011 Google Inc.
     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 #import <QuartzCore/QuartzCore.h>
    10 #import <Cocoa/Cocoa.h>
    11 #import "SkWindow.h"
    12 class SkEvent;
    13 @class SkNSView;
    15 @protocol SkNSViewOptionsDelegate <NSObject>
    16 @optional
    17 // Called when the view needs to handle adding an SkOSMenu
    18 - (void) view:(SkNSView*)view didAddMenu:(const SkOSMenu*)menu;
    19 - (void) view:(SkNSView*)view didUpdateMenu:(const SkOSMenu*)menu;
    20 @end
    22 @interface SkNSView : NSView {
    23     BOOL fRedrawRequestPending;
    25     NSString* fTitle;
    26     SkOSWindow* fWind;
    27 #if SK_SUPPORT_GPU
    28     NSOpenGLContext* fGLContext;
    29 #endif
    30     id<SkNSViewOptionsDelegate> fOptionsDelegate;
    31 }
    33 @property (nonatomic, readonly) SkOSWindow *fWind;
    34 @property (nonatomic, retain) NSString* fTitle;
    35 #if SK_SUPPORT_GPU
    36 @property (nonatomic, retain) NSOpenGLContext* fGLContext;
    37 #endif
    38 @property (nonatomic, assign) id<SkNSViewOptionsDelegate> fOptionsDelegate;
    40 - (id)initWithDefaults;
    41 - (void)setUpWindow;
    42 - (void)resizeSkView:(NSSize)newSize;
    43 - (void)setSkTitle:(const char*)title;
    44 - (void)onAddMenu:(const SkOSMenu*)menu;
    45 - (void)onUpdateMenu:(const SkOSMenu*)menu;
    46 - (void)postInvalWithRect:(const SkIRect*)rectOrNil;
    47 - (BOOL)onHandleEvent:(const SkEvent&)event;
    49 - (bool)attach:(SkOSWindow::SkBackEndTypes)attachType withMSAASampleCount:(int) sampleCount andGetInfo:(SkOSWindow::AttachmentInfo*) info;
    50 - (void)detach;
    51 - (void)present;
    52 @end

mercurial