tor-browser

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

nsDocElementCreatedNotificationRunner.h (1003B)


      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 nsDocElementCreatedNotificationRunner_h
      8 #define nsDocElementCreatedNotificationRunner_h
      9 
     10 #include "mozilla/dom/Document.h"
     11 #include "nsCOMPtr.h"
     12 #include "nsContentSink.h"
     13 #include "nsThreadUtils.h" /* nsRunnable */
     14 
     15 class nsDocElementCreatedNotificationRunner : public mozilla::Runnable {
     16 public:
     17  explicit nsDocElementCreatedNotificationRunner(mozilla::dom::Document* aDoc)
     18      : mozilla::Runnable("nsDocElementCreatedNotificationRunner"),
     19        mDoc(aDoc) {}
     20 
     21  NS_IMETHOD Run() override {
     22    nsContentSink::NotifyDocElementCreated(mDoc);
     23    return NS_OK;
     24  }
     25 
     26  RefPtr<mozilla::dom::Document> mDoc;
     27 };
     28 
     29 #endif /* nsDocElementCreatedNotificationRunner_h */