/src/mozilla-central/dom/base/nsDocElementCreatedNotificationRunner.h
Line | Count | Source (jump to first uncovered line) |
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/Attributes.h" |
11 | | #include "nsThreadUtils.h" /* nsRunnable */ |
12 | | |
13 | | #include "nsContentSink.h" |
14 | | #include "nsCOMPtr.h" |
15 | | #include "nsIDocument.h" |
16 | | |
17 | | class nsDocElementCreatedNotificationRunner : public mozilla::Runnable |
18 | | { |
19 | | public: |
20 | | explicit nsDocElementCreatedNotificationRunner(nsIDocument* aDoc) |
21 | | : mozilla::Runnable("nsDocElementCreatedNotificationRunner") |
22 | | , mDoc(aDoc) |
23 | 0 | { |
24 | 0 | } |
25 | | |
26 | | NS_IMETHOD Run() override |
27 | 0 | { |
28 | 0 | nsContentSink::NotifyDocElementCreated(mDoc); |
29 | 0 | return NS_OK; |
30 | 0 | } |
31 | | |
32 | | nsCOMPtr<nsIDocument> mDoc; |
33 | | }; |
34 | | |
35 | | #endif /* nsDocElementCreatedNotificationRunner_h */ |