| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 CONTENT_EXPORT static RenderViewImpl* Create( | 186 CONTENT_EXPORT static RenderViewImpl* Create( |
| 187 gfx::NativeViewId parent_hwnd, | 187 gfx::NativeViewId parent_hwnd, |
| 188 int32 opener_id, | 188 int32 opener_id, |
| 189 const content::RendererPreferences& renderer_prefs, | 189 const content::RendererPreferences& renderer_prefs, |
| 190 const WebPreferences& webkit_prefs, | 190 const WebPreferences& webkit_prefs, |
| 191 SharedRenderViewCounter* counter, | 191 SharedRenderViewCounter* counter, |
| 192 int32 routing_id, | 192 int32 routing_id, |
| 193 int32 surface_id, | 193 int32 surface_id, |
| 194 int64 session_storage_namespace_id, | 194 int64 session_storage_namespace_id, |
| 195 const string16& frame_name, | 195 const string16& frame_name, |
| 196 bool is_renderer_created, |
| 197 bool swapped_out, |
| 196 int32 next_page_id, | 198 int32 next_page_id, |
| 197 const WebKit::WebScreenInfo& screen_info, | 199 const WebKit::WebScreenInfo& screen_info, |
| 198 bool guest, | 200 bool guest, |
| 199 AccessibilityMode accessibility_mode); | 201 AccessibilityMode accessibility_mode); |
| 200 | 202 |
| 201 // Returns the RenderViewImpl containing the given WebView. | 203 // Returns the RenderViewImpl containing the given WebView. |
| 202 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); | 204 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); |
| 203 | 205 |
| 204 // May return NULL when the view is closing. | 206 // May return NULL when the view is closing. |
| 205 CONTENT_EXPORT WebKit::WebView* webview() const; | 207 CONTENT_EXPORT WebKit::WebView* webview() const; |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 | 737 |
| 736 RenderViewImpl(gfx::NativeViewId parent_hwnd, | 738 RenderViewImpl(gfx::NativeViewId parent_hwnd, |
| 737 int32 opener_id, | 739 int32 opener_id, |
| 738 const content::RendererPreferences& renderer_prefs, | 740 const content::RendererPreferences& renderer_prefs, |
| 739 const WebPreferences& webkit_prefs, | 741 const WebPreferences& webkit_prefs, |
| 740 SharedRenderViewCounter* counter, | 742 SharedRenderViewCounter* counter, |
| 741 int32 routing_id, | 743 int32 routing_id, |
| 742 int32 surface_id, | 744 int32 surface_id, |
| 743 int64 session_storage_namespace_id, | 745 int64 session_storage_namespace_id, |
| 744 const string16& frame_name, | 746 const string16& frame_name, |
| 747 bool is_renderer_created, |
| 748 bool swapped_out, |
| 745 int32 next_page_id, | 749 int32 next_page_id, |
| 746 const WebKit::WebScreenInfo& screen_info, | 750 const WebKit::WebScreenInfo& screen_info, |
| 747 bool guest, | 751 bool guest, |
| 748 AccessibilityMode accessibility_mode); | 752 AccessibilityMode accessibility_mode); |
| 749 | 753 |
| 750 // Do not delete directly. This class is reference counted. | 754 // Do not delete directly. This class is reference counted. |
| 751 virtual ~RenderViewImpl(); | 755 virtual ~RenderViewImpl(); |
| 752 | 756 |
| 753 void UpdateURL(WebKit::WebFrame* frame); | 757 void UpdateURL(WebKit::WebFrame* frame); |
| 754 void UpdateTitle(WebKit::WebFrame* frame, const string16& title, | 758 void UpdateTitle(WebKit::WebFrame* frame, const string16& title, |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 | 976 |
| 973 // Returns false unless this is a top-level navigation that crosses origins. | 977 // Returns false unless this is a top-level navigation that crosses origins. |
| 974 bool IsNonLocalTopLevelNavigation(const GURL& url, | 978 bool IsNonLocalTopLevelNavigation(const GURL& url, |
| 975 WebKit::WebFrame* frame, | 979 WebKit::WebFrame* frame, |
| 976 WebKit::WebNavigationType type); | 980 WebKit::WebNavigationType type); |
| 977 | 981 |
| 978 bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame, | 982 bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame, |
| 979 const WebKit::WebURLError& error, | 983 const WebKit::WebURLError& error, |
| 980 bool replace); | 984 bool replace); |
| 981 | 985 |
| 986 // Make this RenderView show an empty, unscriptable page. |
| 987 void NavigateToSwappedOutURL(); |
| 988 |
| 982 // If we initiated a navigation, this function will populate |document_state| | 989 // If we initiated a navigation, this function will populate |document_state| |
| 983 // with the navigation information saved in OnNavigate(). | 990 // with the navigation information saved in OnNavigate(). |
| 984 void PopulateDocumentStateFromPending(content::DocumentState* document_state); | 991 void PopulateDocumentStateFromPending(content::DocumentState* document_state); |
| 985 | 992 |
| 986 // Returns a new NavigationState populated with the navigation information | 993 // Returns a new NavigationState populated with the navigation information |
| 987 // saved in OnNavigate(). | 994 // saved in OnNavigate(). |
| 988 content::NavigationState* CreateNavigationStateFromPending(); | 995 content::NavigationState* CreateNavigationStateFromPending(); |
| 989 | 996 |
| 990 // Processes the command-line flags --enable-viewport and | 997 // Processes the command-line flags --enable-viewport and |
| 991 // --enable-fixed-layout[=w,h]. | 998 // --enable-fixed-layout[=w,h]. |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 // bunch of stuff, you should probably create a helper class and put your | 1338 // bunch of stuff, you should probably create a helper class and put your |
| 1332 // data and methods on that to avoid bloating RenderView more. You can | 1339 // data and methods on that to avoid bloating RenderView more. You can |
| 1333 // use the Observer interface to filter IPC messages and receive frame change | 1340 // use the Observer interface to filter IPC messages and receive frame change |
| 1334 // notifications. | 1341 // notifications. |
| 1335 // --------------------------------------------------------------------------- | 1342 // --------------------------------------------------------------------------- |
| 1336 | 1343 |
| 1337 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1344 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1338 }; | 1345 }; |
| 1339 | 1346 |
| 1340 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1347 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |