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.
1 //
2 // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
7 // main.h: Management of thread-local data.
9 #ifndef LIBGLESV2_MAIN_H_
10 #define LIBGLESV2_MAIN_H_
12 #include "common/debug.h"
13 #include "common/system.h"
15 namespace egl
16 {
17 class Display;
18 class Surface;
19 }
21 namespace gl
22 {
23 class Context;
25 struct Current
26 {
27 Context *context;
28 egl::Display *display;
29 };
31 void makeCurrent(Context *context, egl::Display *display, egl::Surface *surface);
33 Context *getContext();
34 Context *getNonLostContext();
35 egl::Display *getDisplay();
37 void error(GLenum errorCode);
39 template<class T>
40 const T &error(GLenum errorCode, const T &returnValue)
41 {
42 error(errorCode);
44 return returnValue;
45 }
47 }
49 namespace rx
50 {
51 class Renderer;
52 }
54 extern "C"
55 {
56 // Exported functions for use by EGL
57 gl::Context *glCreateContext(const gl::Context *shareContext, rx::Renderer *renderer, bool notifyResets, bool robustAccess);
58 void glDestroyContext(gl::Context *context);
59 void glMakeCurrent(gl::Context *context, egl::Display *display, egl::Surface *surface);
60 gl::Context *glGetCurrentContext();
61 rx::Renderer *glCreateRenderer(egl::Display *display, HDC hDc, EGLNativeDisplayType displayId);
62 void glDestroyRenderer(rx::Renderer *renderer);
64 __eglMustCastToProperFunctionPointerType __stdcall glGetProcAddress(const char *procname);
65 bool __stdcall glBindTexImage(egl::Surface *surface);
66 }
68 #endif // LIBGLESV2_MAIN_H_