widget/gtk/nsScreenManagerGtk.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* -*- Mode: C++; tab-width: 2; 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 nsScreenManagerGtk_h___
     7 #define nsScreenManagerGtk_h___
     9 #include "nsIScreenManager.h"
    10 #include "nsIScreen.h"
    11 #include "nsCOMPtr.h"
    12 #include "nsCOMArray.h"
    13 #include "prlink.h"
    14 #include "gdk/gdk.h"
    15 #ifdef MOZ_X11
    16 #include <X11/Xlib.h>
    17 #endif
    19 //------------------------------------------------------------------------
    21 class nsScreenManagerGtk : public nsIScreenManager
    22 {
    23 public:
    24   nsScreenManagerGtk ( );
    25   virtual ~nsScreenManagerGtk();
    27   NS_DECL_ISUPPORTS
    28   NS_DECL_NSISCREENMANAGER
    30 #ifdef MOZ_X11
    31   Atom NetWorkareaAtom() { return mNetWorkareaAtom; }
    32 #endif
    34   // For internal use, or reinitialization from change notification.
    35   nsresult Init();
    37 private:
    39   nsresult EnsureInit();
    41   // Cached screen array.  Its length is the number of screens we have.
    42   nsCOMArray<nsIScreen> mCachedScreenArray;
    44   PRLibrary *mXineramalib;
    46   GdkWindow *mRootWindow;
    47 #ifdef MOZ_X11
    48   Atom mNetWorkareaAtom;
    49 #endif
    50 };
    52 #endif  // nsScreenManagerGtk_h___ 

mercurial