| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |
| 143 virtual void ExecuteScriptInNewContext( | 143 virtual void ExecuteScriptInNewContext( |
| 144 const WebKit::WebScriptSource* sources, int num_sources) = 0; | 144 const WebKit::WebScriptSource* sources, int num_sources) = 0; |
| 145 | 145 |
| 146 // 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 |
| 148 // JavaScript objects (String, Array, and so-on). It also gets its own |
| 149 // wrappers for all DOM nodes and DOM constructors. |
| 150 virtual void ExecuteScriptInNewWorld( |
| 151 const WebKit::WebScriptSource* sources, int num_sources) = 0; |
| 152 |
| 146 // Inserts the given CSS styles at the beginning of the document. | 153 // Inserts the given CSS styles at the beginning of the document. |
| 147 virtual bool InsertCSSStyles(const std::string& css) = 0; | 154 virtual bool InsertCSSStyles(const std::string& css) = 0; |
| 148 | 155 |
| 149 // Returns the WebHistoryItem representing the state of the previous page | 156 // Returns the WebHistoryItem representing the state of the previous page |
| 150 // load for later use when loading. The previous page is the page that was | 157 // load for later use when loading. The previous page is the page that was |
| 151 // loaded before DidCommitLoadForFrame was received. | 158 // loaded before DidCommitLoadForFrame was received. |
| 152 // | 159 // |
| 153 // Returns a null item if there is no valid state to return (for example, | 160 // Returns a null item if there is no valid state to return (for example, |
| 154 // there is no previous item). Returns true if the previous item's state was | 161 // there is no previous item). Returns true if the previous item's state was |
| 155 // retrieved, even if that state may be empty. | 162 // retrieved, even if that state may be empty. |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 virtual int PendingFrameUnloadEventCount() const = 0; | 416 virtual int PendingFrameUnloadEventCount() const = 0; |
| 410 | 417 |
| 411 protected: | 418 protected: |
| 412 virtual ~WebFrame() {} | 419 virtual ~WebFrame() {} |
| 413 | 420 |
| 414 private: | 421 private: |
| 415 DISALLOW_COPY_AND_ASSIGN(WebFrame); | 422 DISALLOW_COPY_AND_ASSIGN(WebFrame); |
| 416 }; | 423 }; |
| 417 | 424 |
| 418 #endif // WEBKIT_GLUE_WEBFRAME_H_ | 425 #endif // WEBKIT_GLUE_WEBFRAME_H_ |
| OLD | NEW |