widget/windows/WinTaskbar.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.

michael@0 1 /* vim: se cin sw=2 ts=2 et : */
michael@0 2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 3 *
michael@0 4 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 7
michael@0 8 #ifndef __WinTaskbar_h__
michael@0 9 #define __WinTaskbar_h__
michael@0 10
michael@0 11 #include <windows.h>
michael@0 12 #include <shobjidl.h>
michael@0 13 #undef LogSeverity // SetupAPI.h #defines this as DWORD
michael@0 14 #include "nsIWinTaskbar.h"
michael@0 15 #include "mozilla/Attributes.h"
michael@0 16
michael@0 17 namespace mozilla {
michael@0 18 namespace widget {
michael@0 19
michael@0 20 class WinTaskbar MOZ_FINAL : public nsIWinTaskbar
michael@0 21 {
michael@0 22 public:
michael@0 23 WinTaskbar();
michael@0 24 ~WinTaskbar();
michael@0 25
michael@0 26 NS_DECL_THREADSAFE_ISUPPORTS
michael@0 27 NS_DECL_NSIWINTASKBAR
michael@0 28
michael@0 29 // Registers the global app user model id for the instance.
michael@0 30 // See comments in WinTaskbar.cpp for more information.
michael@0 31 static bool RegisterAppUserModelID();
michael@0 32 static bool GetAppUserModelID(nsAString & aDefaultGroupId);
michael@0 33
michael@0 34 private:
michael@0 35 bool Initialize();
michael@0 36
michael@0 37 typedef HRESULT (WINAPI * SetCurrentProcessExplicitAppUserModelIDPtr)(PCWSTR AppID);
michael@0 38 ITaskbarList4 *mTaskbar;
michael@0 39 };
michael@0 40
michael@0 41 } // namespace widget
michael@0 42 } // namespace mozilla
michael@0 43
michael@0 44 #endif /* __WinTaskbar_h__ */
michael@0 45

mercurial