/src/mozilla-central/dom/base/nsDOMSerializer.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 nsDOMSerializer_h_ |
8 | | #define nsDOMSerializer_h_ |
9 | | |
10 | | #include "mozilla/dom/NonRefcountedDOMObject.h" |
11 | | #include "mozilla/ErrorResult.h" |
12 | | #include "mozilla/dom/XMLSerializerBinding.h" |
13 | | |
14 | | class nsINode; |
15 | | class nsIOutputStream; |
16 | | |
17 | | class nsDOMSerializer final : public mozilla::dom::NonRefcountedDOMObject |
18 | | { |
19 | | public: |
20 | | nsDOMSerializer(); |
21 | | |
22 | | // WebIDL API |
23 | | static nsDOMSerializer* |
24 | | Constructor(const mozilla::dom::GlobalObject& aOwner, |
25 | | mozilla::ErrorResult& rv) |
26 | 0 | { |
27 | 0 | return new nsDOMSerializer(); |
28 | 0 | } |
29 | | |
30 | | void |
31 | | SerializeToString(nsINode& aRoot, nsAString& aStr, |
32 | | mozilla::ErrorResult& rv); |
33 | | |
34 | | void |
35 | | SerializeToStream(nsINode& aRoot, nsIOutputStream* aStream, |
36 | | const nsAString& aCharset, |
37 | | mozilla::ErrorResult& aRv); |
38 | | |
39 | | bool WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto, |
40 | | JS::MutableHandle<JSObject*> aReflector) |
41 | 0 | { |
42 | 0 | return mozilla::dom::XMLSerializer_Binding::Wrap(aCx, this, aGivenProto, |
43 | 0 | aReflector); |
44 | 0 | } |
45 | | }; |
46 | | |
47 | | |
48 | | #endif |
49 | | |