gfx/layers/composite/X11TextureHost.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     2  * This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef MOZILLA_GFX_X11TEXTUREHOST__H
     7 #define MOZILLA_GFX_X11TEXTUREHOST__H
     9 #include "mozilla/layers/TextureHost.h"
    10 #include "mozilla/layers/LayersSurfaces.h"
    11 #include "mozilla/gfx/Types.h"
    13 class gfxXlibSurface;
    15 namespace mozilla {
    16 namespace layers {
    18 // TextureHost for Xlib-backed TextureSources.
    19 class X11TextureHost : public TextureHost
    20 {
    21 public:
    22   X11TextureHost(TextureFlags aFlags,
    23                  const SurfaceDescriptorX11& aDescriptor);
    25   virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE;
    27   virtual bool Lock() MOZ_OVERRIDE;
    29   virtual gfx::SurfaceFormat GetFormat() const MOZ_OVERRIDE;
    31   virtual gfx::IntSize GetSize() const MOZ_OVERRIDE;
    33   virtual NewTextureSource* GetTextureSources() MOZ_OVERRIDE
    34   {
    35     return mTextureSource;
    36   }
    38   virtual TemporaryRef<gfx::DataSourceSurface> GetAsSurface() MOZ_OVERRIDE
    39   {
    40     return nullptr; // XXX - implement this (for MOZ_DUMP_PAINTING)
    41   }
    43 #ifdef MOZ_LAYERS_HAVE_LOG
    44   virtual const char* Name() { return "X11TextureHost"; }
    45 #endif
    47 protected:
    48   Compositor* mCompositor;
    49   RefPtr<NewTextureSource> mTextureSource;
    50   RefPtr<gfxXlibSurface> mSurface;
    51 };
    53 } // namespace layers
    54 } // namespace mozilla
    56 #endif // MOZILLA_GFX_X11TEXTUREHOST__H

mercurial