OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 class WebFormElement; | 58 class WebFormElement; |
59 class WebFrame; | 59 class WebFrame; |
60 class WebElementCollection; | 60 class WebElementCollection; |
61 class WebNodeList; | 61 class WebNodeList; |
62 class WebString; | 62 class WebString; |
63 class WebURL; | 63 class WebURL; |
64 | 64 |
65 // Provides readonly access to some properties of a DOM document. | 65 // Provides readonly access to some properties of a DOM document. |
66 class WebDocument : public WebNode { | 66 class WebDocument : public WebNode { |
67 public: | 67 public: |
68 // FIXME: Stop using this from Chromium code and get rid of this enum. | |
69 enum UserStyleLevel { | |
70 UserStyleAuthorLevel | |
71 }; | |
72 | |
73 WebDocument() { } | 68 WebDocument() { } |
74 WebDocument(const WebDocument& e) : WebNode(e) { } | 69 WebDocument(const WebDocument& e) : WebNode(e) { } |
75 | 70 |
76 WebDocument& operator=(const WebDocument& e) | 71 WebDocument& operator=(const WebDocument& e) |
77 { | 72 { |
78 WebNode::assign(e); | 73 WebNode::assign(e); |
79 return *this; | 74 return *this; |
80 } | 75 } |
81 void assign(const WebDocument& e) { WebNode::assign(e); } | 76 void assign(const WebDocument& e) { WebNode::assign(e); } |
82 | 77 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Accessibility support. These methods should only be called on the | 118 // Accessibility support. These methods should only be called on the |
124 // top-level document, because one accessibility cache spans all of | 119 // top-level document, because one accessibility cache spans all of |
125 // the documents on the page. | 120 // the documents on the page. |
126 | 121 |
127 // Gets the accessibility object for this document. | 122 // Gets the accessibility object for this document. |
128 BLINK_EXPORT WebAXObject accessibilityObject() const; | 123 BLINK_EXPORT WebAXObject accessibilityObject() const; |
129 | 124 |
130 // Gets the accessibility object for an object on this page by ID. | 125 // Gets the accessibility object for an object on this page by ID. |
131 BLINK_EXPORT WebAXObject accessibilityObjectFromID(int axID) const; | 126 BLINK_EXPORT WebAXObject accessibilityObjectFromID(int axID) const; |
132 // Inserts the given CSS source code as a stylesheet in the document. | 127 // Inserts the given CSS source code as a stylesheet in the document. |
133 // FIXME: Delete insertUserStyleSheet once Chromium code stops calling it. | |
134 BLINK_EXPORT void insertUserStyleSheet(const WebString& sourceCode, UserStyl
eLevel); | |
135 BLINK_EXPORT void insertStyleSheet(const WebString& sourceCode); | 128 BLINK_EXPORT void insertStyleSheet(const WebString& sourceCode); |
136 | 129 |
137 // Arranges to call WebFrameClient::didMatchCSS(frame(), ...) when one of | 130 // Arranges to call WebFrameClient::didMatchCSS(frame(), ...) when one of |
138 // the selectors matches or stops matching an element in this document. | 131 // the selectors matches or stops matching an element in this document. |
139 // Each call to this method overrides any previous calls. | 132 // Each call to this method overrides any previous calls. |
140 BLINK_EXPORT void watchCSSSelectors(const WebVector<WebString>& selectors); | 133 BLINK_EXPORT void watchCSSSelectors(const WebVector<WebString>& selectors); |
141 | 134 |
142 BLINK_EXPORT WebVector<WebDraggableRegion> draggableRegions() const; | 135 BLINK_EXPORT WebVector<WebDraggableRegion> draggableRegions() const; |
143 | 136 |
144 BLINK_EXPORT v8::Handle<v8::Value> registerEmbedderCustomElement(const WebSt
ring& name, v8::Handle<v8::Value> options, WebExceptionCode&); | 137 BLINK_EXPORT v8::Handle<v8::Value> registerEmbedderCustomElement(const WebSt
ring& name, v8::Handle<v8::Value> options, WebExceptionCode&); |
145 | 138 |
146 #if BLINK_IMPLEMENTATION | 139 #if BLINK_IMPLEMENTATION |
147 WebDocument(const WTF::PassRefPtr<WebCore::Document>&); | 140 WebDocument(const WTF::PassRefPtr<WebCore::Document>&); |
148 WebDocument& operator=(const WTF::PassRefPtr<WebCore::Document>&); | 141 WebDocument& operator=(const WTF::PassRefPtr<WebCore::Document>&); |
149 operator WTF::PassRefPtr<WebCore::Document>() const; | 142 operator WTF::PassRefPtr<WebCore::Document>() const; |
150 #endif | 143 #endif |
151 }; | 144 }; |
152 | 145 |
153 } // namespace blink | 146 } // namespace blink |
154 | 147 |
155 #endif | 148 #endif |
OLD | NEW |