widget/qt/nsClipboard.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: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     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/. */
     5 #ifndef nsClipboard_h__
     6 #define nsClipboard_h__
     8 #include "nsIClipboard.h"
     9 #include "nsITransferable.h"
    10 #include "nsIClipboardOwner.h"
    11 #include "nsClipboardPrivacyHandler.h"
    12 #include "nsAutoPtr.h"
    13 #include "nsCOMPtr.h"
    15 #include <qclipboard.h>
    17 /* Native Qt Clipboard wrapper */
    18 class nsClipboard : public nsIClipboard
    19 {
    20 public:
    21     nsClipboard();
    22     virtual ~nsClipboard();
    24     //nsISupports
    25     NS_DECL_ISUPPORTS
    27     // nsIClipboard
    28     NS_DECL_NSICLIPBOARD
    30 protected:
    31     NS_IMETHOD SetNativeClipboardData(nsITransferable *aTransferable,
    32                                       QClipboard::Mode cbMode);
    33     NS_IMETHOD GetNativeClipboardData(nsITransferable *aTransferable,
    34                                       QClipboard::Mode cbMode);
    36     nsCOMPtr<nsIClipboardOwner> mSelectionOwner;
    37     nsCOMPtr<nsIClipboardOwner> mGlobalOwner;
    38     nsCOMPtr<nsITransferable>   mSelectionTransferable;
    39     nsCOMPtr<nsITransferable>   mGlobalTransferable;
    40     nsRefPtr<nsClipboardPrivacyHandler> mPrivacyHandler;
    41 };
    43 #endif // nsClipboard_h__

mercurial