tor-browser

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

ChromeObserver.h (1133B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef mozilla_dom_ChromeObserver_h
      8 #define mozilla_dom_ChromeObserver_h
      9 
     10 #include "nsStubMutationObserver.h"
     11 
     12 class nsIWidget;
     13 
     14 namespace mozilla::dom {
     15 class Document;
     16 
     17 class ChromeObserver final : public nsStubMutationObserver {
     18 public:
     19  NS_DECL_ISUPPORTS
     20 
     21  explicit ChromeObserver(Document* aDocument);
     22  void Init();
     23 
     24  NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
     25  NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
     26 
     27 protected:
     28  nsIWidget* GetWindowWidget();
     29  void SetHideTitlebarSeparator(bool);
     30  void HideWindowChrome(bool aShouldHide);
     31  void SetCustomTitlebar(bool);
     32  void SetMica(bool);
     33  ~ChromeObserver();
     34  // A weak pointer cleared when the element will be destroyed.
     35  Document* MOZ_NON_OWNING_REF mDocument;
     36 };
     37 
     38 }  // namespace mozilla::dom
     39 
     40 #endif  // mozilla_dom_ChromeObserver_h