OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // something to the user (e.g., a local error page or the alternate error | 88 // something to the user (e.g., a local error page or the alternate error |
89 // page). | 89 // page). |
90 virtual void LoadAlternateHTMLErrorPage(const WebRequest* request, | 90 virtual void LoadAlternateHTMLErrorPage(const WebRequest* request, |
91 const WebError& error, | 91 const WebError& error, |
92 const GURL& error_page_url, | 92 const GURL& error_page_url, |
93 bool replace, | 93 bool replace, |
94 const GURL& fake_url) = 0; | 94 const GURL& fake_url) = 0; |
95 | 95 |
96 // Executes a string of JavaScript in the web frame. The script_url param is | 96 // Executes a string of JavaScript in the web frame. The script_url param is |
97 // the URL where the script in question can be found, if any. The renderer may | 97 // the URL where the script in question can be found, if any. The renderer may |
98 // request this URL to show the developer the source of the error. | 98 // request this URL to show the developer the source of the error. The |
| 99 // start_line parameter is the base line number to use for error reporting. |
99 virtual void ExecuteJavaScript(const std::string& js_code, | 100 virtual void ExecuteJavaScript(const std::string& js_code, |
100 const GURL& script_url) = 0; | 101 const GURL& script_url, |
| 102 int start_line) = 0; |
101 | 103 |
102 // Returns a string representing the state of the previous page load for | 104 // Returns a string representing the state of the previous page load for |
103 // later use when loading. The previous page is the page that was loaded | 105 // later use when loading. The previous page is the page that was loaded |
104 // before DidCommitLoadForFrame was received. | 106 // before DidCommitLoadForFrame was received. |
105 // | 107 // |
106 // Returns false if there is no valid state to return (for example, there is | 108 // Returns false if there is no valid state to return (for example, there is |
107 // no previous item). Returns true if the previous item's state was retrieved, | 109 // no previous item). Returns true if the previous item's state was retrieved, |
108 // even if that state may be empty. | 110 // even if that state may be empty. |
109 virtual bool GetPreviousHistoryState(std::string* history_state) const = 0; | 111 virtual bool GetPreviousHistoryState(std::string* history_state) const = 0; |
110 | 112 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 virtual bool IsReloadAllowingStaleData() const = 0; | 374 virtual bool IsReloadAllowingStaleData() const = 0; |
373 | 375 |
374 // Only for test_shell | 376 // Only for test_shell |
375 virtual int PendingFrameUnloadEventCount() const = 0; | 377 virtual int PendingFrameUnloadEventCount() const = 0; |
376 | 378 |
377 private: | 379 private: |
378 DISALLOW_COPY_AND_ASSIGN(WebFrame); | 380 DISALLOW_COPY_AND_ASSIGN(WebFrame); |
379 }; | 381 }; |
380 | 382 |
381 #endif // WEBKIT_GLUE_WEBFRAME_H_ | 383 #endif // WEBKIT_GLUE_WEBFRAME_H_ |
OLD | NEW |