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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // Asks the WebFrame to try and download the alternate error page. We notify | 84 // Asks the WebFrame to try and download the alternate error page. We notify |
85 // the WebViewDelegate of the results so it can decide whether or not to show | 85 // the WebViewDelegate of the results so it can decide whether or not to show |
86 // something to the user (e.g., a local error page or the alternate error | 86 // something to the user (e.g., a local error page or the alternate error |
87 // page). | 87 // page). |
88 virtual void LoadAlternateHTMLErrorPage(const WebRequest* request, | 88 virtual void LoadAlternateHTMLErrorPage(const WebRequest* request, |
89 const WebError& error, | 89 const WebError& error, |
90 const GURL& error_page_url, | 90 const GURL& error_page_url, |
91 bool replace, | 91 bool replace, |
92 const GURL& fake_url) = 0; | 92 const GURL& fake_url) = 0; |
93 | 93 |
| 94 // Executes a string of JavaScript in the web frame. The script_url param is |
| 95 // the URL where the script in question can be found, if any. The renderer may |
| 96 // request this URL to show the developer the source of the error. |
| 97 virtual void ExecuteJavaScript(const std::string& js_code, |
| 98 const std::string& script_url) = 0; |
| 99 |
94 // Returns a string representing the state of the previous page load for | 100 // Returns a string representing the state of the previous page load for |
95 // later use when loading as well as the uri and title of the page. The | 101 // later use when loading as well as the uri and title of the page. The |
96 // previous page is the page that was loaded before DidCommitLoadForFrame was | 102 // previous page is the page that was loaded before DidCommitLoadForFrame was |
97 // received. Returns false if there is no state. | 103 // received. Returns false if there is no state. |
98 virtual bool GetPreviousState(GURL* url, std::wstring* title, | 104 virtual bool GetPreviousState(GURL* url, std::wstring* title, |
99 std::string* history_state) const = 0; | 105 std::string* history_state) const = 0; |
100 | 106 |
101 // Returns a string representing the state of the current page load for later | 107 // Returns a string representing the state of the current page load for later |
102 // use when loading as well as the url and title of the page. Returns false | 108 // use when loading as well as the url and title of the page. Returns false |
103 // if there is no state. | 109 // if there is no state. |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 virtual bool IsReloadAllowingStaleData() const = 0; | 361 virtual bool IsReloadAllowingStaleData() const = 0; |
356 | 362 |
357 // Only for test_shell | 363 // Only for test_shell |
358 virtual int PendingFrameUnloadEventCount() const = 0; | 364 virtual int PendingFrameUnloadEventCount() const = 0; |
359 | 365 |
360 private: | 366 private: |
361 DISALLOW_COPY_AND_ASSIGN(WebFrame); | 367 DISALLOW_COPY_AND_ASSIGN(WebFrame); |
362 }; | 368 }; |
363 | 369 |
364 #endif // WEBKIT_GLUE_WEBFRAME_H_ | 370 #endif // WEBKIT_GLUE_WEBFRAME_H_ |
OLD | NEW |