toolkit/components/alerts/nsAlertsService.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: 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 nsAlertsService_h__
     7 #define nsAlertsService_h__
     9 #include "nsIAlertsService.h"
    10 #include "nsCOMPtr.h"
    11 #include "nsXULAlerts.h"
    13 #ifdef XP_WIN
    14 typedef enum tagMOZ_QUERY_USER_NOTIFICATION_STATE {
    15     QUNS_NOT_PRESENT = 1,
    16     QUNS_BUSY = 2,
    17     QUNS_RUNNING_D3D_FULL_SCREEN = 3,
    18     QUNS_PRESENTATION_MODE = 4,
    19     QUNS_ACCEPTS_NOTIFICATIONS = 5,
    20     QUNS_QUIET_TIME = 6,
    21     QUNS_IMMERSIVE = 7
    22 } MOZ_QUERY_USER_NOTIFICATION_STATE;
    24 extern "C" {
    25 // This function is Windows Vista or later
    26 typedef HRESULT (__stdcall *SHQueryUserNotificationStatePtr)(MOZ_QUERY_USER_NOTIFICATION_STATE *pquns);
    27 }
    28 #endif // defined(XP_WIN)
    30 class nsAlertsService : public nsIAlertsService,
    31                         public nsIAlertsProgressListener
    32 {
    33 public:
    34   NS_DECL_NSIALERTSPROGRESSLISTENER
    35   NS_DECL_NSIALERTSSERVICE
    36   NS_DECL_ISUPPORTS
    38   nsAlertsService();
    39   virtual ~nsAlertsService();
    41 protected:
    42   bool ShouldShowAlert();
    43   nsXULAlerts mXULAlerts;
    44 };
    46 #endif /* nsAlertsService_h__ */

mercurial