widget/windows/TaskbarPreviewButton.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 /* vim: se cin sw=2 ts=2 et : */
     2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     3  *
     4  * This Source Code Form is subject to the terms of the Mozilla Public
     5  * License, v. 2.0. If a copy of the MPL was not distributed with this
     6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     8 #ifndef __mozilla_widget_TaskbarPreviewButton_h__
     9 #define __mozilla_widget_TaskbarPreviewButton_h__
    11 #include <windows.h>
    12 #include <shobjidl.h>
    13 #undef LogSeverity // SetupAPI.h #defines this as DWORD
    15 #include <nsITaskbarPreviewButton.h>
    16 #include <nsAutoPtr.h>
    17 #include <nsString.h>
    18 #include <nsWeakReference.h>
    20 namespace mozilla {
    21 namespace widget {
    23 class TaskbarWindowPreview;
    24 class TaskbarPreviewButton : public nsITaskbarPreviewButton, public nsSupportsWeakReference
    25 {
    26 public: 
    27   TaskbarPreviewButton(TaskbarWindowPreview* preview, uint32_t index);
    28   virtual ~TaskbarPreviewButton();
    30   NS_DECL_ISUPPORTS
    31   NS_DECL_NSITASKBARPREVIEWBUTTON
    33 private:
    34   THUMBBUTTON&            Button();
    35   nsresult                Update();
    37   nsRefPtr<TaskbarWindowPreview> mPreview;
    38   uint32_t                mIndex;
    39   nsString                mTooltip;
    40   nsCOMPtr<imgIContainer> mImage;
    41 };
    43 } // namespace widget
    44 } // namespace mozilla
    46 #endif /* __mozilla_widget_TaskbarPreviewButton_h__ */

mercurial