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 | // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. |
michael@0 | 3 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 4 | // found in the LICENSE file. |
michael@0 | 5 | // |
michael@0 | 6 | |
michael@0 | 7 | // Display.h: Defines the egl::Display class, representing the abstract |
michael@0 | 8 | // display on which graphics are drawn. Implements EGLDisplay. |
michael@0 | 9 | // [EGL 1.4] section 2.1.2 page 3. |
michael@0 | 10 | |
michael@0 | 11 | #ifndef LIBEGL_DISPLAY_H_ |
michael@0 | 12 | #define LIBEGL_DISPLAY_H_ |
michael@0 | 13 | |
michael@0 | 14 | #include "common/system.h" |
michael@0 | 15 | |
michael@0 | 16 | #include <set> |
michael@0 | 17 | #include <vector> |
michael@0 | 18 | |
michael@0 | 19 | #include "libEGL/Config.h" |
michael@0 | 20 | |
michael@0 | 21 | namespace gl |
michael@0 | 22 | { |
michael@0 | 23 | class Context; |
michael@0 | 24 | } |
michael@0 | 25 | |
michael@0 | 26 | namespace egl |
michael@0 | 27 | { |
michael@0 | 28 | class Surface; |
michael@0 | 29 | |
michael@0 | 30 | class Display |
michael@0 | 31 | { |
michael@0 | 32 | public: |
michael@0 | 33 | ~Display(); |
michael@0 | 34 | |
michael@0 | 35 | bool initialize(); |
michael@0 | 36 | void terminate(); |
michael@0 | 37 | |
michael@0 | 38 | static egl::Display *getDisplay(EGLNativeDisplayType displayId); |
michael@0 | 39 | |
michael@0 | 40 | bool getConfigs(EGLConfig *configs, const EGLint *attribList, EGLint configSize, EGLint *numConfig); |
michael@0 | 41 | bool getConfigAttrib(EGLConfig config, EGLint attribute, EGLint *value); |
michael@0 | 42 | |
michael@0 | 43 | EGLSurface createWindowSurface(HWND window, EGLConfig config, const EGLint *attribList); |
michael@0 | 44 | EGLSurface createOffscreenSurface(EGLConfig config, HANDLE shareHandle, const EGLint *attribList); |
michael@0 | 45 | EGLContext createContext(EGLConfig configHandle, const gl::Context *shareContext, bool notifyResets, bool robustAccess); |
michael@0 | 46 | |
michael@0 | 47 | void destroySurface(egl::Surface *surface); |
michael@0 | 48 | void destroyContext(gl::Context *context); |
michael@0 | 49 | |
michael@0 | 50 | bool isInitialized() const; |
michael@0 | 51 | bool isValidConfig(EGLConfig config); |
michael@0 | 52 | bool isValidContext(gl::Context *context); |
michael@0 | 53 | bool isValidSurface(egl::Surface *surface); |
michael@0 | 54 | bool hasExistingWindowSurface(HWND window); |
michael@0 | 55 | |
michael@0 | 56 | rx::Renderer *getRenderer() { return mRenderer; }; |
michael@0 | 57 | |
michael@0 | 58 | // exported methods must be virtual |
michael@0 | 59 | virtual void notifyDeviceLost(); |
michael@0 | 60 | virtual void recreateSwapChains(); |
michael@0 | 61 | |
michael@0 | 62 | const char *getExtensionString() const; |
michael@0 | 63 | const char *getVendorString() const; |
michael@0 | 64 | |
michael@0 | 65 | private: |
michael@0 | 66 | DISALLOW_COPY_AND_ASSIGN(Display); |
michael@0 | 67 | |
michael@0 | 68 | Display(EGLNativeDisplayType displayId, HDC deviceContext); |
michael@0 | 69 | |
michael@0 | 70 | bool restoreLostDevice(); |
michael@0 | 71 | |
michael@0 | 72 | EGLNativeDisplayType mDisplayId; |
michael@0 | 73 | const HDC mDc; |
michael@0 | 74 | |
michael@0 | 75 | bool mSoftwareDevice; |
michael@0 | 76 | |
michael@0 | 77 | typedef std::set<Surface*> SurfaceSet; |
michael@0 | 78 | SurfaceSet mSurfaceSet; |
michael@0 | 79 | |
michael@0 | 80 | ConfigSet mConfigSet; |
michael@0 | 81 | |
michael@0 | 82 | typedef std::set<gl::Context*> ContextSet; |
michael@0 | 83 | ContextSet mContextSet; |
michael@0 | 84 | |
michael@0 | 85 | rx::Renderer *mRenderer; |
michael@0 | 86 | |
michael@0 | 87 | void initExtensionString(); |
michael@0 | 88 | void initVendorString(); |
michael@0 | 89 | std::string mExtensionString; |
michael@0 | 90 | std::string mVendorString; |
michael@0 | 91 | }; |
michael@0 | 92 | } |
michael@0 | 93 | |
michael@0 | 94 | #endif // LIBEGL_DISPLAY_H_ |