tor-browser

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

HTMLTitleElement.h (1747B)


      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_HTMLTITLEElement_h_
      8 #define mozilla_dom_HTMLTITLEElement_h_
      9 
     10 #include "nsGenericHTMLElement.h"
     11 #include "nsStubMutationObserver.h"
     12 
     13 namespace mozilla {
     14 class ErrorResult;
     15 
     16 namespace dom {
     17 
     18 class HTMLTitleElement final : public nsGenericHTMLElement,
     19                               public nsStubMutationObserver {
     20 public:
     21  using Element::GetCharacterDataBuffer;
     22 
     23  explicit HTMLTitleElement(
     24      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
     25 
     26  // nsISupports
     27  NS_DECL_ISUPPORTS_INHERITED
     28 
     29  // HTMLTitleElement
     30  void GetText(DOMString& aText, ErrorResult& aError) const;
     31  void SetText(const nsAString& aText, ErrorResult& aError);
     32 
     33  // nsIMutationObserver
     34  NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
     35  NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
     36  NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
     37  NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
     38 
     39  virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
     40 
     41  virtual nsresult BindToTree(BindContext&, nsINode& aParent) override;
     42 
     43  virtual void UnbindFromTree(UnbindContext&) override;
     44 
     45  virtual void DoneAddingChildren(bool aHaveNotified) override;
     46 
     47 protected:
     48  virtual ~HTMLTitleElement();
     49 
     50  JSObject* WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto) final;
     51 
     52 private:
     53  void SendTitleChangeEvent(bool aBound);
     54 };
     55 
     56 }  // namespace dom
     57 }  // namespace mozilla
     58 
     59 #endif  // mozilla_dom_HTMLTitleElement_h_