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 | /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
michael@0 | 2 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef GFX_NV3DVUTILS_H |
michael@0 | 7 | #define GFX_NV3DVUTILS_H |
michael@0 | 8 | |
michael@0 | 9 | #include "Layers.h" |
michael@0 | 10 | #include <windows.h> |
michael@0 | 11 | #include <d3d9.h> |
michael@0 | 12 | |
michael@0 | 13 | namespace mozilla { |
michael@0 | 14 | namespace layers { |
michael@0 | 15 | |
michael@0 | 16 | #define FIREFOX_3DV_APP_HANDLE 0xECB992B6 |
michael@0 | 17 | |
michael@0 | 18 | enum Nv_Stereo_Mode { |
michael@0 | 19 | NV_STEREO_MODE_LEFT_RIGHT = 0, |
michael@0 | 20 | NV_STEREO_MODE_RIGHT_LEFT = 1, |
michael@0 | 21 | NV_STEREO_MODE_TOP_BOTTOM = 2, |
michael@0 | 22 | NV_STEREO_MODE_BOTTOM_TOP = 3, |
michael@0 | 23 | NV_STEREO_MODE_MONO = 4, |
michael@0 | 24 | NV_STEREO_MODE_LAST = 5 |
michael@0 | 25 | }; |
michael@0 | 26 | |
michael@0 | 27 | class INv3DVStreaming : public IUnknown { |
michael@0 | 28 | |
michael@0 | 29 | public: |
michael@0 | 30 | virtual bool Nv3DVInitialize() = 0; |
michael@0 | 31 | virtual bool Nv3DVRelease() = 0; |
michael@0 | 32 | virtual bool Nv3DVSetDevice(IUnknown* pDevice) = 0; |
michael@0 | 33 | virtual bool Nv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle) = 0; |
michael@0 | 34 | virtual bool Nv3DVMetaData(DWORD dwWidth, DWORD dwHeight, HANDLE hSrcLuma, HANDLE hDst) = 0; |
michael@0 | 35 | }; |
michael@0 | 36 | |
michael@0 | 37 | /* |
michael@0 | 38 | * Nv3DVUtils class |
michael@0 | 39 | */ |
michael@0 | 40 | class Nv3DVUtils { |
michael@0 | 41 | |
michael@0 | 42 | public: |
michael@0 | 43 | Nv3DVUtils(); |
michael@0 | 44 | ~Nv3DVUtils(); |
michael@0 | 45 | |
michael@0 | 46 | /* |
michael@0 | 47 | * Initializes the Nv3DVUtils object. |
michael@0 | 48 | */ |
michael@0 | 49 | void Initialize(); |
michael@0 | 50 | |
michael@0 | 51 | /* |
michael@0 | 52 | * Release any resources if needed |
michael@0 | 53 | * |
michael@0 | 54 | */ |
michael@0 | 55 | void UnInitialize(); |
michael@0 | 56 | |
michael@0 | 57 | /* |
michael@0 | 58 | * Sets the device info, along with any other initialization that is needed after device creation |
michael@0 | 59 | * Pass the D3D9 device pointer is an IUnknown input argument |
michael@0 | 60 | */ |
michael@0 | 61 | void SetDeviceInfo(IUnknown *devUnknown); |
michael@0 | 62 | |
michael@0 | 63 | /* |
michael@0 | 64 | * Send Stereo Control Information. Used mainly to re-route |
michael@0 | 65 | * calls from ImageLayerD3D9 to the 3DV COM object |
michael@0 | 66 | */ |
michael@0 | 67 | void SendNv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle); |
michael@0 | 68 | |
michael@0 | 69 | /* |
michael@0 | 70 | * Send Stereo Metadata. Used mainly to re-route calls |
michael@0 | 71 | * from ImageLayerD3D9 to the 3DV COM object |
michael@0 | 72 | */ |
michael@0 | 73 | void SendNv3DVMetaData(unsigned int dwWidth, unsigned int dwHeight, HANDLE hSrcLuma, HANDLE hDst); |
michael@0 | 74 | |
michael@0 | 75 | private: |
michael@0 | 76 | |
michael@0 | 77 | /* Nv3DVStreaming interface pointer */ |
michael@0 | 78 | nsRefPtr<INv3DVStreaming> m3DVStreaming; |
michael@0 | 79 | |
michael@0 | 80 | }; |
michael@0 | 81 | |
michael@0 | 82 | |
michael@0 | 83 | } /* layers */ |
michael@0 | 84 | } /* mozilla */ |
michael@0 | 85 | |
michael@0 | 86 | #endif /* GFX_NV3DVUTILS_H */ |