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/. */
7 #ifndef mozilla_dom_ChromeObserver_h
8 #define mozilla_dom_ChromeObserver_h
10 #include "nsStubMutationObserver.h"
18 class ChromeObserver final
: public nsStubMutationObserver
{
22 explicit ChromeObserver(Document
* aDocument
);
25 NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
26 NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
29 nsIWidget
* GetWindowWidget();
30 void SetDrawsInTitlebar(bool aState
);
31 void SetDrawsTitle(bool aState
);
32 void SetChromeMargins(const nsAttrValue
* aValue
);
33 nsresult
HideWindowChrome(bool aShouldHide
);
36 void ResetChromeMargins();
38 // A weak pointer cleared when the element will be destroyed.
39 Document
* MOZ_NON_OWNING_REF mDocument
;
43 } // namespace mozilla
45 #endif // mozilla_dom_ChromeObserver_h