tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsSecureBrowserUI.h (1334B)


      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/. */
      5 
      6 #ifndef nsSecureBrowserUIImpl_h
      7 #define nsSecureBrowserUIImpl_h
      8 
      9 #include "nsCOMPtr.h"
     10 #include "nsISecureBrowserUI.h"
     11 #include "nsITransportSecurityInfo.h"
     12 #include "nsIWebProgressListener.h"
     13 #include "nsWeakReference.h"
     14 
     15 class nsITransportSecurityInfo;
     16 class nsIChannel;
     17 
     18 namespace mozilla {
     19 namespace dom {
     20 class Document;
     21 class WindowGlobalParent;
     22 class CanonicalBrowsingContext;
     23 }  // namespace dom
     24 }  // namespace mozilla
     25 
     26 #define NS_SECURE_BROWSER_UI_CID \
     27  {0xcc75499a, 0x1dd1, 0x11b2, {0x8a, 0x82, 0xca, 0x41, 0x0a, 0xc9, 0x07, 0xb8}}
     28 
     29 class nsSecureBrowserUI : public nsISecureBrowserUI,
     30                          public nsSupportsWeakReference {
     31 public:
     32  explicit nsSecureBrowserUI(
     33      mozilla::dom::CanonicalBrowsingContext* aBrowsingContext);
     34 
     35  NS_DECL_ISUPPORTS
     36  NS_DECL_NSISECUREBROWSERUI
     37 
     38  void RecomputeSecurityFlags();
     39 
     40 protected:
     41  virtual ~nsSecureBrowserUI() = default;
     42 
     43  mozilla::dom::WindowGlobalParent* GetCurrentWindow();
     44 
     45  uint32_t mState;
     46  uint64_t mBrowsingContextId;
     47 };
     48 
     49 #endif  // nsSecureBrowserUIImpl_h