| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ |
| 6 #define CHROME_RENDERER_RENDER_VIEW_H_ | 6 #define CHROME_RENDERER_RENDER_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 virtual void DidFailProvisionalLoadWithError( | 179 virtual void DidFailProvisionalLoadWithError( |
| 180 WebView* webview, | 180 WebView* webview, |
| 181 const WebKit::WebURLError& error, | 181 const WebKit::WebURLError& error, |
| 182 WebFrame* frame); | 182 WebFrame* frame); |
| 183 virtual void LoadNavigationErrorPage( | 183 virtual void LoadNavigationErrorPage( |
| 184 WebFrame* frame, | 184 WebFrame* frame, |
| 185 const WebKit::WebURLRequest& failed_request, | 185 const WebKit::WebURLRequest& failed_request, |
| 186 const WebKit::WebURLError& error, | 186 const WebKit::WebURLError& error, |
| 187 const std::string& html, | 187 const std::string& html, |
| 188 bool replace); | 188 bool replace); |
| 189 virtual void DidReceiveDocumentData(WebFrame* frame, const char* data, |
| 190 size_t data_len); |
| 189 virtual void DidCommitLoadForFrame(WebView* webview, WebFrame* frame, | 191 virtual void DidCommitLoadForFrame(WebView* webview, WebFrame* frame, |
| 190 bool is_new_navigation); | 192 bool is_new_navigation); |
| 191 virtual void DidReceiveTitle(WebView* webview, | 193 virtual void DidReceiveTitle(WebView* webview, |
| 192 const std::wstring& title, | 194 const std::wstring& title, |
| 193 WebFrame* frame); | 195 WebFrame* frame); |
| 194 virtual void DidFinishLoadForFrame(WebView* webview, | 196 virtual void DidFinishLoadForFrame(WebView* webview, |
| 195 WebFrame* frame); | 197 WebFrame* frame); |
| 196 virtual void DidFailLoadWithError(WebView* webview, | 198 virtual void DidFailLoadWithError(WebView* webview, |
| 197 const WebKit::WebURLError& error, | 199 const WebKit::WebURLError& error, |
| 198 WebFrame* forFrame); | 200 WebFrame* forFrame); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 209 virtual void DidContentsSizeChange(WebKit::WebWidget* webwidget, | 211 virtual void DidContentsSizeChange(WebKit::WebWidget* webwidget, |
| 210 int new_width, | 212 int new_width, |
| 211 int new_height); | 213 int new_height); |
| 212 | 214 |
| 213 virtual void DidCompleteClientRedirect(WebView* webview, | 215 virtual void DidCompleteClientRedirect(WebView* webview, |
| 214 WebFrame* frame, | 216 WebFrame* frame, |
| 215 const GURL& source); | 217 const GURL& source); |
| 216 virtual void WillCloseFrame(WebView* webview, WebFrame* frame); | 218 virtual void WillCloseFrame(WebView* webview, WebFrame* frame); |
| 217 virtual void WillSubmitForm(WebView* webview, WebFrame* frame, | 219 virtual void WillSubmitForm(WebView* webview, WebFrame* frame, |
| 218 const WebKit::WebForm& form); | 220 const WebKit::WebForm& form); |
| 219 virtual void WillSendRequest(WebView* webview, | 221 virtual void WillSendRequest(WebFrame* webframe, |
| 220 uint32 identifier, | 222 uint32 identifier, |
| 221 WebKit::WebURLRequest* request); | 223 WebKit::WebURLRequest* request); |
| 224 virtual void DidReceiveResponse(WebFrame* webframe, |
| 225 uint32 identifier, |
| 226 const WebKit::WebURLResponse& response); |
| 227 virtual void DidFinishLoading(WebFrame* webframe, uint32 identifier); |
| 222 | 228 |
| 223 virtual void WindowObjectCleared(WebFrame* webframe); | 229 virtual void WindowObjectCleared(WebFrame* webframe); |
| 224 virtual void DocumentElementAvailable(WebFrame* webframe); | 230 virtual void DocumentElementAvailable(WebFrame* webframe); |
| 225 virtual void DidCreateScriptContextForFrame(WebFrame* webframe); | 231 virtual void DidCreateScriptContextForFrame(WebFrame* webframe); |
| 226 virtual void DidDestroyScriptContextForFrame(WebFrame* webframe); | 232 virtual void DidDestroyScriptContextForFrame(WebFrame* webframe); |
| 227 virtual void DidCreateIsolatedScriptContext(WebFrame* webframe); | 233 virtual void DidCreateIsolatedScriptContext(WebFrame* webframe); |
| 228 | 234 |
| 229 virtual WebKit::WebNavigationPolicy PolicyForNavigationAction( | 235 virtual WebKit::WebNavigationPolicy PolicyForNavigationAction( |
| 230 WebView* webview, | 236 WebView* webview, |
| 231 WebFrame* frame, | 237 WebFrame* frame, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 253 virtual WebKit::WebMediaPlayer* CreateWebMediaPlayer( | 259 virtual WebKit::WebMediaPlayer* CreateWebMediaPlayer( |
| 254 WebKit::WebMediaPlayerClient* client); | 260 WebKit::WebMediaPlayerClient* client); |
| 255 virtual void OnMissingPluginStatus(WebPluginDelegate* delegate, int status); | 261 virtual void OnMissingPluginStatus(WebPluginDelegate* delegate, int status); |
| 256 virtual void OpenURL(WebView* webview, const GURL& url, | 262 virtual void OpenURL(WebView* webview, const GURL& url, |
| 257 const GURL& referrer, | 263 const GURL& referrer, |
| 258 WebKit::WebNavigationPolicy policy); | 264 WebKit::WebNavigationPolicy policy); |
| 259 virtual void DidDownloadImage(int id, | 265 virtual void DidDownloadImage(int id, |
| 260 const GURL& image_url, | 266 const GURL& image_url, |
| 261 bool errored, | 267 bool errored, |
| 262 const SkBitmap& image); | 268 const SkBitmap& image); |
| 263 virtual GURL GetAlternateErrorPageURL(const GURL& failedURL, | |
| 264 ErrorPageType error_type); | |
| 265 | 269 |
| 266 virtual void ShowContextMenu(WebView* webview, | 270 virtual void ShowContextMenu(WebView* webview, |
| 267 ContextNodeType node_type, | 271 ContextNodeType node_type, |
| 268 int x, | 272 int x, |
| 269 int y, | 273 int y, |
| 270 const GURL& link_url, | 274 const GURL& link_url, |
| 271 const GURL& src_url, | 275 const GURL& src_url, |
| 272 const GURL& page_url, | 276 const GURL& page_url, |
| 273 const GURL& frame_url, | 277 const GURL& frame_url, |
| 274 const ContextMenuMediaParams& media_params, | 278 const ContextMenuMediaParams& media_params, |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 // information to the browser process. | 606 // information to the browser process. |
| 603 void BindDOMAutomationController(WebFrame* webframe); | 607 void BindDOMAutomationController(WebFrame* webframe); |
| 604 | 608 |
| 605 // Creates DevToolsClient and sets up JavaScript bindings for developer tools | 609 // Creates DevToolsClient and sets up JavaScript bindings for developer tools |
| 606 // UI that is going to be hosted by this RenderView. | 610 // UI that is going to be hosted by this RenderView. |
| 607 void CreateDevToolsClient(); | 611 void CreateDevToolsClient(); |
| 608 | 612 |
| 609 // Locates a sub frame with given xpath | 613 // Locates a sub frame with given xpath |
| 610 WebFrame* GetChildFrame(const std::wstring& frame_xpath) const; | 614 WebFrame* GetChildFrame(const std::wstring& frame_xpath) const; |
| 611 | 615 |
| 616 enum ErrorPageType { |
| 617 DNS_ERROR, |
| 618 HTTP_404, |
| 619 CONNECTION_ERROR, |
| 620 }; |
| 621 |
| 612 // Alternate error page helpers. | 622 // Alternate error page helpers. |
| 623 GURL GetAlternateErrorPageURL( |
| 624 const GURL& failed_url, ErrorPageType error_type); |
| 613 bool MaybeLoadAlternateErrorPage( | 625 bool MaybeLoadAlternateErrorPage( |
| 614 WebFrame* frame, const WebKit::WebURLError& error, bool replace); | 626 WebFrame* frame, const WebKit::WebURLError& error, bool replace); |
| 615 std::string GetAltHTMLForTemplate( | 627 std::string GetAltHTMLForTemplate( |
| 616 const DictionaryValue& error_strings, int template_resource_id) const; | 628 const DictionaryValue& error_strings, int template_resource_id) const; |
| 617 void AltErrorPageFinished( | 629 void AltErrorPageFinished( |
| 618 WebFrame* frame, const WebKit::WebURLError& original_error, | 630 WebFrame* frame, const WebKit::WebURLError& original_error, |
| 619 const std::string& html); | 631 const std::string& html); |
| 620 | 632 |
| 621 virtual void DidAddHistoryItem(); | 633 virtual void DidAddHistoryItem(); |
| 622 | 634 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 | 835 |
| 824 RendererPreferences renderer_preferences_; | 836 RendererPreferences renderer_preferences_; |
| 825 | 837 |
| 826 // page id for the last navigation sent to the browser. | 838 // page id for the last navigation sent to the browser. |
| 827 int32 last_top_level_navigation_page_id_; | 839 int32 last_top_level_navigation_page_id_; |
| 828 | 840 |
| 829 DISALLOW_COPY_AND_ASSIGN(RenderView); | 841 DISALLOW_COPY_AND_ASSIGN(RenderView); |
| 830 }; | 842 }; |
| 831 | 843 |
| 832 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 844 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |