OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_GLUE_WEBFRAME_H_ | 5 #ifndef WEBKIT_GLUE_WEBFRAME_H_ |
6 #define WEBKIT_GLUE_WEBFRAME_H_ | 6 #define WEBKIT_GLUE_WEBFRAME_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // be modified to inherit parameters that allow it to be loaded. This method | 132 // be modified to inherit parameters that allow it to be loaded. This method |
133 // ends up triggering WebViewDelegate::WillSendRequest. | 133 // ends up triggering WebViewDelegate::WillSendRequest. |
134 virtual void DispatchWillSendRequest(WebKit::WebURLRequest* request) = 0; | 134 virtual void DispatchWillSendRequest(WebKit::WebURLRequest* request) = 0; |
135 | 135 |
136 // Executes JavaScript in the web frame. | 136 // Executes JavaScript in the web frame. |
137 virtual void ExecuteScript(const WebKit::WebScriptSource& source) = 0; | 137 virtual void ExecuteScript(const WebKit::WebScriptSource& source) = 0; |
138 | 138 |
139 // Executes JavaScript in a new context associated with the web frame. The | 139 // Executes JavaScript in a new context associated with the web frame. The |
140 // script gets its own global scope and its own prototypes for intrinsic | 140 // script gets its own global scope and its own prototypes for intrinsic |
141 // JavaScript objects (String, Array, and so-on). It shares the wrappers for | 141 // JavaScript objects (String, Array, and so-on). It shares the wrappers for |
142 // all DOM nodes and DOM constructors. | 142 // all DOM nodes and DOM constructors. extension_group is an |
| 143 // embedder-provided specifier that controls which v8 extensions are loaded |
| 144 // into the new context - see WebKit::registerExtension for the corresponding |
| 145 // specifier. |
143 virtual void ExecuteScriptInNewContext( | 146 virtual void ExecuteScriptInNewContext( |
144 const WebKit::WebScriptSource* sources, int num_sources) = 0; | 147 const WebKit::WebScriptSource* sources, int num_sources, |
| 148 int extension_group) = 0; |
145 | 149 |
146 // Executes JavaScript in a new world associated with the web frame. The | 150 // Executes JavaScript in a new world associated with the web frame. The |
147 // script gets its own global scope and its own prototypes for intrinsic | 151 // script gets its own global scope and its own prototypes for intrinsic |
148 // JavaScript objects (String, Array, and so-on). It also gets its own | 152 // JavaScript objects (String, Array, and so-on). It also gets its own |
149 // wrappers for all DOM nodes and DOM constructors. | 153 // wrappers for all DOM nodes and DOM constructors. extension_group is an |
| 154 // embedder-provided specifier that controls which v8 extensions are loaded |
| 155 // into the new context - see WebKit::registerExtension for the corresponding |
| 156 // specifier. |
150 virtual void ExecuteScriptInNewWorld( | 157 virtual void ExecuteScriptInNewWorld( |
151 const WebKit::WebScriptSource* sources, int num_sources) = 0; | 158 const WebKit::WebScriptSource* sources, int num_sources, |
| 159 int extension_group) = 0; |
152 | 160 |
153 // Inserts the given CSS styles at the beginning of the document. | 161 // Inserts the given CSS styles at the beginning of the document. |
154 virtual bool InsertCSSStyles(const std::string& css) = 0; | 162 virtual bool InsertCSSStyles(const std::string& css) = 0; |
155 | 163 |
156 // Returns the WebHistoryItem representing the state of the previous page | 164 // Returns the WebHistoryItem representing the state of the previous page |
157 // load for later use when loading. The previous page is the page that was | 165 // load for later use when loading. The previous page is the page that was |
158 // loaded before DidCommitLoadForFrame was received. | 166 // loaded before DidCommitLoadForFrame was received. |
159 // | 167 // |
160 // Returns a null item if there is no valid state to return (for example, | 168 // Returns a null item if there is no valid state to return (for example, |
161 // there is no previous item). Returns true if the previous item's state was | 169 // there is no previous item). Returns true if the previous item's state was |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 virtual int PendingFrameUnloadEventCount() const = 0; | 424 virtual int PendingFrameUnloadEventCount() const = 0; |
417 | 425 |
418 protected: | 426 protected: |
419 virtual ~WebFrame() {} | 427 virtual ~WebFrame() {} |
420 | 428 |
421 private: | 429 private: |
422 DISALLOW_COPY_AND_ASSIGN(WebFrame); | 430 DISALLOW_COPY_AND_ASSIGN(WebFrame); |
423 }; | 431 }; |
424 | 432 |
425 #endif // WEBKIT_GLUE_WEBFRAME_H_ | 433 #endif // WEBKIT_GLUE_WEBFRAME_H_ |
OLD | NEW |