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: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| michael@0 | 2 | /* vim: set ts=2 et sw=2 tw=80: */ |
| michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
| michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
| michael@0 | 5 | * You can obtain one at http://mozilla.org/MPL/2.0/. |
| michael@0 | 6 | */ |
| michael@0 | 7 | |
| michael@0 | 8 | enum CameraMode { "picture", "video" }; |
| michael@0 | 9 | |
| michael@0 | 10 | /* Used for the dimensions of a captured picture, |
| michael@0 | 11 | a preview stream, a video capture stream, etc. */ |
| michael@0 | 12 | dictionary CameraSize |
| michael@0 | 13 | { |
| michael@0 | 14 | unsigned long width = 0; |
| michael@0 | 15 | unsigned long height = 0; |
| michael@0 | 16 | }; |
| michael@0 | 17 | |
| michael@0 | 18 | /* Pre-emptive camera configuration options. */ |
| michael@0 | 19 | dictionary CameraConfiguration |
| michael@0 | 20 | { |
| michael@0 | 21 | CameraMode mode = "picture"; |
| michael@0 | 22 | CameraSize previewSize = null; |
| michael@0 | 23 | DOMString recorderProfile = "cif"; // or some other recording profile |
| michael@0 | 24 | // supported by the CameraControl |
| michael@0 | 25 | }; |
| michael@0 | 26 | |
| michael@0 | 27 | callback CameraErrorCallback = void (DOMString error); |
| michael@0 | 28 | |
| michael@0 | 29 | callback GetCameraCallback = void (CameraControl camera, |
| michael@0 | 30 | CameraConfiguration configuration); |
| michael@0 | 31 | |
| michael@0 | 32 | [Func="nsDOMCameraManager::HasSupport"] |
| michael@0 | 33 | interface CameraManager |
| michael@0 | 34 | { |
| michael@0 | 35 | /* get a camera instance; 'camera' is one of the camera |
| michael@0 | 36 | identifiers returned by getListOfCameras() below. |
| michael@0 | 37 | */ |
| michael@0 | 38 | [Throws] |
| michael@0 | 39 | void getCamera(DOMString camera, |
| michael@0 | 40 | CameraConfiguration initialConfiguration, |
| michael@0 | 41 | GetCameraCallback callback, |
| michael@0 | 42 | optional CameraErrorCallback errorCallback); |
| michael@0 | 43 | |
| michael@0 | 44 | /* return an array of camera identifiers, e.g. |
| michael@0 | 45 | [ "front", "back" ] |
| michael@0 | 46 | */ |
| michael@0 | 47 | [Throws] |
| michael@0 | 48 | sequence<DOMString> getListOfCameras(); |
| michael@0 | 49 | }; |