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 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "content/common/navigation_gesture.h" | 28 #include "content/common/navigation_gesture.h" |
29 #include "content/common/view_message_enums.h" | 29 #include "content/common/view_message_enums.h" |
30 #include "content/public/common/javascript_message_type.h" | 30 #include "content/public/common/javascript_message_type.h" |
31 #include "content/public/common/page_zoom.h" | 31 #include "content/public/common/page_zoom.h" |
32 #include "content/public/common/referrer.h" | 32 #include "content/public/common/referrer.h" |
33 #include "content/public/common/renderer_preferences.h" | 33 #include "content/public/common/renderer_preferences.h" |
34 #include "content/public/common/stop_find_action.h" | 34 #include "content/public/common/stop_find_action.h" |
35 #include "content/public/common/top_controls_state.h" | 35 #include "content/public/common/top_controls_state.h" |
36 #include "content/public/renderer/render_view.h" | 36 #include "content/public/renderer/render_view.h" |
37 #include "content/renderer/mouse_lock_dispatcher.h" | 37 #include "content/renderer/mouse_lock_dispatcher.h" |
| 38 #include "content/renderer/render_frame_impl.h" |
38 #include "content/renderer/render_view_pepper_helper.h" | 39 #include "content/renderer/render_view_pepper_helper.h" |
39 #include "content/renderer/render_widget.h" | 40 #include "content/renderer/render_widget.h" |
40 #include "content/renderer/renderer_webcookiejar_impl.h" | 41 #include "content/renderer/renderer_webcookiejar_impl.h" |
41 #include "ipc/ipc_platform_file.h" | 42 #include "ipc/ipc_platform_file.h" |
42 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h" | 43 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h" |
43 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 44 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" | 46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" |
46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" | 47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |
47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" | 48 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 // Creates a new RenderView. If this is a blocked popup or as a new tab, | 206 // Creates a new RenderView. If this is a blocked popup or as a new tab, |
206 // opener_id is the routing ID of the RenderView responsible for creating this | 207 // opener_id is the routing ID of the RenderView responsible for creating this |
207 // RenderView. |counter| is either a currently initialized counter, or NULL | 208 // RenderView. |counter| is either a currently initialized counter, or NULL |
208 // (in which case we treat this RenderView as a top level window). | 209 // (in which case we treat this RenderView as a top level window). |
209 static RenderViewImpl* Create( | 210 static RenderViewImpl* Create( |
210 int32 opener_id, | 211 int32 opener_id, |
211 const RendererPreferences& renderer_prefs, | 212 const RendererPreferences& renderer_prefs, |
212 const WebPreferences& webkit_prefs, | 213 const WebPreferences& webkit_prefs, |
213 SharedRenderViewCounter* counter, | 214 SharedRenderViewCounter* counter, |
214 int32 routing_id, | 215 int32 routing_id, |
| 216 int32 main_frame_routing_id, |
215 int32 surface_id, | 217 int32 surface_id, |
216 int64 session_storage_namespace_id, | 218 int64 session_storage_namespace_id, |
217 const string16& frame_name, | 219 const string16& frame_name, |
218 bool is_renderer_created, | 220 bool is_renderer_created, |
219 bool swapped_out, | 221 bool swapped_out, |
220 int32 next_page_id, | 222 int32 next_page_id, |
221 const WebKit::WebScreenInfo& screen_info, | 223 const WebKit::WebScreenInfo& screen_info, |
222 AccessibilityMode accessibility_mode, | 224 AccessibilityMode accessibility_mode, |
223 bool allow_partial_swap); | 225 bool allow_partial_swap); |
224 | 226 |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 GetCompositionCharacterBoundsTest); | 861 GetCompositionCharacterBoundsTest); |
860 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); | 862 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); |
861 #if defined(OS_MACOSX) | 863 #if defined(OS_MACOSX) |
862 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, MacTestCmdUp); | 864 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, MacTestCmdUp); |
863 #endif | 865 #endif |
864 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SetHistoryLengthAndPrune); | 866 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SetHistoryLengthAndPrune); |
865 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ZoomLimit); | 867 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ZoomLimit); |
866 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, NavigateFrame); | 868 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, NavigateFrame); |
867 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 869 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
868 ShouldUpdateSelectionTextFromContextMenuParams); | 870 ShouldUpdateSelectionTextFromContextMenuParams); |
| 871 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, BasicRenderFrame); |
869 | 872 |
870 typedef std::map<GURL, double> HostZoomLevels; | 873 typedef std::map<GURL, double> HostZoomLevels; |
871 | 874 |
872 enum ErrorPageType { | 875 enum ErrorPageType { |
873 DNS_ERROR, | 876 DNS_ERROR, |
874 HTTP_404, | 877 HTTP_404, |
875 CONNECTION_ERROR, | 878 CONNECTION_ERROR, |
876 }; | 879 }; |
877 | 880 |
878 void UpdateURL(WebKit::WebFrame* frame); | 881 void UpdateURL(WebKit::WebFrame* frame); |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 // or right" state that was last sent to the browser. | 1363 // or right" state that was last sent to the browser. |
1361 bool cached_is_main_frame_pinned_to_left_; | 1364 bool cached_is_main_frame_pinned_to_left_; |
1362 bool cached_is_main_frame_pinned_to_right_; | 1365 bool cached_is_main_frame_pinned_to_right_; |
1363 | 1366 |
1364 // These store the "has scrollbars" state last sent to the browser. | 1367 // These store the "has scrollbars" state last sent to the browser. |
1365 bool cached_has_main_frame_horizontal_scrollbar_; | 1368 bool cached_has_main_frame_horizontal_scrollbar_; |
1366 bool cached_has_main_frame_vertical_scrollbar_; | 1369 bool cached_has_main_frame_vertical_scrollbar_; |
1367 | 1370 |
1368 // Helper objects ------------------------------------------------------------ | 1371 // Helper objects ------------------------------------------------------------ |
1369 | 1372 |
| 1373 scoped_ptr<RenderFrameImpl> main_render_frame_; |
| 1374 |
1370 RendererWebCookieJarImpl cookie_jar_; | 1375 RendererWebCookieJarImpl cookie_jar_; |
1371 | 1376 |
1372 // The next group of objects all implement RenderViewObserver, so are deleted | 1377 // The next group of objects all implement RenderViewObserver, so are deleted |
1373 // along with the RenderView automatically. This is why we just store | 1378 // along with the RenderView automatically. This is why we just store |
1374 // weak references. | 1379 // weak references. |
1375 | 1380 |
1376 // Holds a reference to the service which provides desktop notifications. | 1381 // Holds a reference to the service which provides desktop notifications. |
1377 NotificationProvider* notification_provider_; | 1382 NotificationProvider* notification_provider_; |
1378 | 1383 |
1379 // The geolocation dispatcher attached to this view, lazily initialized. | 1384 // The geolocation dispatcher attached to this view, lazily initialized. |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 // use the Observer interface to filter IPC messages and receive frame change | 1540 // use the Observer interface to filter IPC messages and receive frame change |
1536 // notifications. | 1541 // notifications. |
1537 // --------------------------------------------------------------------------- | 1542 // --------------------------------------------------------------------------- |
1538 | 1543 |
1539 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1544 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
1540 }; | 1545 }; |
1541 | 1546 |
1542 } // namespace content | 1547 } // namespace content |
1543 | 1548 |
1544 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1549 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |