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: 2 -*- */ |
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_ColorLayerComposite_H |
michael@0 | 7 | #define GFX_ColorLayerComposite_H |
michael@0 | 8 | |
michael@0 | 9 | #include "Layers.h" // for ColorLayer, etc |
michael@0 | 10 | #include "mozilla/Attributes.h" // for MOZ_OVERRIDE |
michael@0 | 11 | #include "mozilla/layers/LayerManagerComposite.h" // for LayerComposite, etc |
michael@0 | 12 | #include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, etc |
michael@0 | 13 | |
michael@0 | 14 | struct nsIntPoint; |
michael@0 | 15 | struct nsIntRect; |
michael@0 | 16 | |
michael@0 | 17 | namespace mozilla { |
michael@0 | 18 | namespace layers { |
michael@0 | 19 | |
michael@0 | 20 | class CompositableHost; |
michael@0 | 21 | |
michael@0 | 22 | class ColorLayerComposite : public ColorLayer, |
michael@0 | 23 | public LayerComposite |
michael@0 | 24 | { |
michael@0 | 25 | public: |
michael@0 | 26 | ColorLayerComposite(LayerManagerComposite *aManager) |
michael@0 | 27 | : ColorLayer(aManager, nullptr) |
michael@0 | 28 | , LayerComposite(aManager) |
michael@0 | 29 | { |
michael@0 | 30 | MOZ_COUNT_CTOR(ColorLayerComposite); |
michael@0 | 31 | mImplData = static_cast<LayerComposite*>(this); |
michael@0 | 32 | } |
michael@0 | 33 | ~ColorLayerComposite() |
michael@0 | 34 | { |
michael@0 | 35 | MOZ_COUNT_DTOR(ColorLayerComposite); |
michael@0 | 36 | Destroy(); |
michael@0 | 37 | } |
michael@0 | 38 | |
michael@0 | 39 | // LayerComposite Implementation |
michael@0 | 40 | virtual Layer* GetLayer() MOZ_OVERRIDE { return this; } |
michael@0 | 41 | |
michael@0 | 42 | virtual void Destroy() MOZ_OVERRIDE { mDestroyed = true; } |
michael@0 | 43 | |
michael@0 | 44 | virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE; |
michael@0 | 45 | virtual void CleanupResources() MOZ_OVERRIDE {}; |
michael@0 | 46 | |
michael@0 | 47 | CompositableHost* GetCompositableHost() MOZ_OVERRIDE { return nullptr; } |
michael@0 | 48 | |
michael@0 | 49 | virtual LayerComposite* AsLayerComposite() MOZ_OVERRIDE { return this; } |
michael@0 | 50 | |
michael@0 | 51 | virtual const char* Name() const MOZ_OVERRIDE { return "ColorLayerComposite"; } |
michael@0 | 52 | }; |
michael@0 | 53 | |
michael@0 | 54 | } /* layers */ |
michael@0 | 55 | } /* mozilla */ |
michael@0 | 56 | #endif /* GFX_ColorLayerComposite_H */ |