| 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 12 matching lines...) Expand all Loading... |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "content/common/content_export.h" | 24 #include "content/common/content_export.h" |
| 25 #include "content/common/edit_command.h" | 25 #include "content/common/edit_command.h" |
| 26 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 26 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 27 #include "content/common/navigation_gesture.h" | 27 #include "content/common/navigation_gesture.h" |
| 28 #include "content/public/common/page_zoom.h" | 28 #include "content/public/common/page_zoom.h" |
| 29 #include "content/public/common/referrer.h" | 29 #include "content/public/common/referrer.h" |
| 30 #include "content/public/common/renderer_preferences.h" | 30 #include "content/public/common/renderer_preferences.h" |
| 31 #include "content/public/common/stop_find_action.h" | 31 #include "content/public/common/stop_find_action.h" |
| 32 #include "content/public/renderer/render_view.h" | 32 #include "content/public/renderer/render_view.h" |
| 33 #include "content/renderer/guest_render_view_observer.h" |
| 33 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" | 34 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
| 34 #include "content/renderer/renderer_webcookiejar_impl.h" | 35 #include "content/renderer/renderer_webcookiejar_impl.h" |
| 35 #include "content/renderer/render_view_selection.h" | 36 #include "content/renderer/render_view_selection.h" |
| 36 #include "content/renderer/render_widget.h" | 37 #include "content/renderer/render_widget.h" |
| 37 #include "ipc/ipc_platform_file.h" | 38 #include "ipc/ipc_platform_file.h" |
| 38 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" | 39 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" |
| 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
| 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" | 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |
| 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" |
| 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 57 // root. VS warns when we inherit the WebWidgetClient method implementations | 58 // root. VS warns when we inherit the WebWidgetClient method implementations |
| 58 // from RenderWidget. It's safe to ignore that warning. | 59 // from RenderWidget. It's safe to ignore that warning. |
| 59 #pragma warning(disable: 4250) | 60 #pragma warning(disable: 4250) |
| 60 #endif | 61 #endif |
| 61 | 62 |
| 62 class DeviceOrientationDispatcher; | 63 class DeviceOrientationDispatcher; |
| 63 class DevToolsAgent; | 64 class DevToolsAgent; |
| 64 class DomAutomationController; | 65 class DomAutomationController; |
| 65 class ExternalPopupMenu; | 66 class ExternalPopupMenu; |
| 66 class GeolocationDispatcher; | 67 class GeolocationDispatcher; |
| 68 class GuestRenderViewObserver; |
| 67 class GURL; | 69 class GURL; |
| 68 class JavaBridgeDispatcher; | 70 class JavaBridgeDispatcher; |
| 69 class LoadProgressTracker; | 71 class LoadProgressTracker; |
| 70 class MediaStreamDispatcher; | 72 class MediaStreamDispatcher; |
| 71 class MediaStreamImpl; | 73 class MediaStreamImpl; |
| 72 class MouseLockDispatcher; | 74 class MouseLockDispatcher; |
| 73 class NotificationProvider; | 75 class NotificationProvider; |
| 74 class PepperDeviceTest; | 76 class PepperDeviceTest; |
| 75 struct PP_NetAddress_Private; | 77 struct PP_NetAddress_Private; |
| 76 class RenderWidgetFullscreenPepper; | 78 class RenderWidgetFullscreenPepper; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 class ImageResourceFetcher; | 113 class ImageResourceFetcher; |
| 112 class ResourceFetcher; | 114 class ResourceFetcher; |
| 113 } | 115 } |
| 114 | 116 |
| 115 namespace WebKit { | 117 namespace WebKit { |
| 116 class WebApplicationCacheHost; | 118 class WebApplicationCacheHost; |
| 117 class WebApplicationCacheHostClient; | 119 class WebApplicationCacheHostClient; |
| 118 class WebDataSource; | 120 class WebDataSource; |
| 119 class WebDragData; | 121 class WebDragData; |
| 120 class WebGeolocationClient; | 122 class WebGeolocationClient; |
| 123 class WebGraphicsContext3D; |
| 121 class WebIconURL; | 124 class WebIconURL; |
| 122 class WebImage; | 125 class WebImage; |
| 123 class WebMediaPlayer; | 126 class WebMediaPlayer; |
| 124 class WebMediaPlayerClient; | 127 class WebMediaPlayerClient; |
| 125 class WebMouseEvent; | 128 class WebMouseEvent; |
| 126 class WebPeerConnectionHandler; | 129 class WebPeerConnectionHandler; |
| 127 class WebPeerConnectionHandlerClient; | 130 class WebPeerConnectionHandlerClient; |
| 128 class WebSpeechInputController; | 131 class WebSpeechInputController; |
| 129 class WebSpeechInputListener; | 132 class WebSpeechInputListener; |
| 130 class WebStorageNamespace; | 133 class WebStorageNamespace; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 gfx::NativeViewId parent_hwnd, | 181 gfx::NativeViewId parent_hwnd, |
| 179 int32 opener_id, | 182 int32 opener_id, |
| 180 const content::RendererPreferences& renderer_prefs, | 183 const content::RendererPreferences& renderer_prefs, |
| 181 const WebPreferences& webkit_prefs, | 184 const WebPreferences& webkit_prefs, |
| 182 SharedRenderViewCounter* counter, | 185 SharedRenderViewCounter* counter, |
| 183 int32 routing_id, | 186 int32 routing_id, |
| 184 int32 surface_id, | 187 int32 surface_id, |
| 185 int64 session_storage_namespace_id, | 188 int64 session_storage_namespace_id, |
| 186 const string16& frame_name, | 189 const string16& frame_name, |
| 187 int32 next_page_id, | 190 int32 next_page_id, |
| 188 const WebKit::WebScreenInfo& screen_info); | 191 const WebKit::WebScreenInfo& screen_info, |
| 192 bool guest); |
| 189 | 193 |
| 190 // Returns the RenderViewImpl containing the given WebView. | 194 // Returns the RenderViewImpl containing the given WebView. |
| 191 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); | 195 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); |
| 192 | 196 |
| 193 // May return NULL when the view is closing. | 197 // May return NULL when the view is closing. |
| 194 CONTENT_EXPORT WebKit::WebView* webview() const; | 198 CONTENT_EXPORT WebKit::WebView* webview() const; |
| 195 | 199 |
| 196 // WebGraphicsContext3DSwapBuffersClient implementation. | 200 // WebGraphicsContext3DSwapBuffersClient implementation. |
| 197 | 201 |
| 198 // Called by a GraphicsContext associated with this view when swapbuffers | 202 // Called by a GraphicsContext associated with this view when swapbuffers |
| 199 // is posted, completes or is aborted. | 203 // is posted, completes or is aborted. |
| 200 virtual void OnViewContextSwapBuffersPosted() OVERRIDE; | 204 virtual void OnViewContextSwapBuffersPosted() OVERRIDE; |
| 201 virtual void OnViewContextSwapBuffersComplete() OVERRIDE; | 205 virtual void OnViewContextSwapBuffersComplete() OVERRIDE; |
| 202 virtual void OnViewContextSwapBuffersAborted() OVERRIDE; | 206 virtual void OnViewContextSwapBuffersAborted() OVERRIDE; |
| 203 | 207 |
| 208 // Called by the associated GuestRenderViewObserver when a |
| 209 // guest-to-host channel has been established. |
| 210 void OnGuestReady(); |
| 211 |
| 204 int history_list_offset() const { return history_list_offset_; } | 212 int history_list_offset() const { return history_list_offset_; } |
| 205 | 213 |
| 206 const WebPreferences& webkit_preferences() const { | 214 const WebPreferences& webkit_preferences() const { |
| 207 return webkit_preferences_; | 215 return webkit_preferences_; |
| 208 } | 216 } |
| 209 | 217 |
| 210 void set_send_content_state_immediately(bool value) { | 218 void set_send_content_state_immediately(bool value) { |
| 211 send_content_state_immediately_ = value; | 219 send_content_state_immediately_ = value; |
| 212 } | 220 } |
| 213 | 221 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 virtual bool Send(IPC::Message* message) OVERRIDE; | 595 virtual bool Send(IPC::Message* message) OVERRIDE; |
| 588 virtual int GetRoutingID() const OVERRIDE; | 596 virtual int GetRoutingID() const OVERRIDE; |
| 589 virtual int GetPageId() OVERRIDE; | 597 virtual int GetPageId() OVERRIDE; |
| 590 virtual gfx::Size GetSize() OVERRIDE; | 598 virtual gfx::Size GetSize() OVERRIDE; |
| 591 virtual gfx::NativeViewId GetHostWindow() OVERRIDE; | 599 virtual gfx::NativeViewId GetHostWindow() OVERRIDE; |
| 592 virtual WebPreferences& GetWebkitPreferences() OVERRIDE; | 600 virtual WebPreferences& GetWebkitPreferences() OVERRIDE; |
| 593 virtual WebKit::WebView* GetWebView() OVERRIDE; | 601 virtual WebKit::WebView* GetWebView() OVERRIDE; |
| 594 virtual WebKit::WebNode GetFocusedNode() const OVERRIDE; | 602 virtual WebKit::WebNode GetFocusedNode() const OVERRIDE; |
| 595 virtual WebKit::WebNode GetContextMenuNode() const OVERRIDE; | 603 virtual WebKit::WebNode GetContextMenuNode() const OVERRIDE; |
| 596 virtual bool IsEditableNode(const WebKit::WebNode& node) OVERRIDE; | 604 virtual bool IsEditableNode(const WebKit::WebNode& node) OVERRIDE; |
| 605 virtual WebKit::WebPlugin* CreateBrowserPlugin( |
| 606 base::ProcessHandle process_handle, |
| 607 const IPC::ChannelHandle& channel_handle, |
| 608 const WebKit::WebPluginParams& params) OVERRIDE; |
| 597 virtual WebKit::WebPlugin* CreatePlugin( | 609 virtual WebKit::WebPlugin* CreatePlugin( |
| 598 WebKit::WebFrame* frame, | 610 WebKit::WebFrame* frame, |
| 599 const webkit::WebPluginInfo& info, | 611 const webkit::WebPluginInfo& info, |
| 600 const WebKit::WebPluginParams& params) OVERRIDE; | 612 const WebKit::WebPluginParams& params) OVERRIDE; |
| 601 virtual void EvaluateScript(const string16& frame_xpath, | 613 virtual void EvaluateScript(const string16& frame_xpath, |
| 602 const string16& jscript, | 614 const string16& jscript, |
| 603 int id, | 615 int id, |
| 604 bool notify_result) OVERRIDE; | 616 bool notify_result) OVERRIDE; |
| 605 virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE; | 617 virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE; |
| 606 virtual int GetEnabledBindings() OVERRIDE; | 618 virtual int GetEnabledBindings() OVERRIDE; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 RenderViewImpl(gfx::NativeViewId parent_hwnd, | 731 RenderViewImpl(gfx::NativeViewId parent_hwnd, |
| 720 int32 opener_id, | 732 int32 opener_id, |
| 721 const content::RendererPreferences& renderer_prefs, | 733 const content::RendererPreferences& renderer_prefs, |
| 722 const WebPreferences& webkit_prefs, | 734 const WebPreferences& webkit_prefs, |
| 723 SharedRenderViewCounter* counter, | 735 SharedRenderViewCounter* counter, |
| 724 int32 routing_id, | 736 int32 routing_id, |
| 725 int32 surface_id, | 737 int32 surface_id, |
| 726 int64 session_storage_namespace_id, | 738 int64 session_storage_namespace_id, |
| 727 const string16& frame_name, | 739 const string16& frame_name, |
| 728 int32 next_page_id, | 740 int32 next_page_id, |
| 729 const WebKit::WebScreenInfo& screen_info); | 741 const WebKit::WebScreenInfo& screen_info, |
| 742 bool guest); |
| 730 | 743 |
| 731 // Do not delete directly. This class is reference counted. | 744 // Do not delete directly. This class is reference counted. |
| 732 virtual ~RenderViewImpl(); | 745 virtual ~RenderViewImpl(); |
| 733 | 746 |
| 734 void UpdateURL(WebKit::WebFrame* frame); | 747 void UpdateURL(WebKit::WebFrame* frame); |
| 735 void UpdateTitle(WebKit::WebFrame* frame, const string16& title, | 748 void UpdateTitle(WebKit::WebFrame* frame, const string16& title, |
| 736 WebKit::WebTextDirection title_direction); | 749 WebKit::WebTextDirection title_direction); |
| 737 void UpdateSessionHistory(WebKit::WebFrame* frame); | 750 void UpdateSessionHistory(WebKit::WebFrame* frame); |
| 738 | 751 |
| 739 // Update current main frame's encoding and send it to browser window. | 752 // Update current main frame's encoding and send it to browser window. |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 | 1189 |
| 1177 // Holds a reference to the service which provides desktop notifications. | 1190 // Holds a reference to the service which provides desktop notifications. |
| 1178 NotificationProvider* notification_provider_; | 1191 NotificationProvider* notification_provider_; |
| 1179 | 1192 |
| 1180 // The geolocation dispatcher attached to this view, lazily initialized. | 1193 // The geolocation dispatcher attached to this view, lazily initialized. |
| 1181 GeolocationDispatcher* geolocation_dispatcher_; | 1194 GeolocationDispatcher* geolocation_dispatcher_; |
| 1182 | 1195 |
| 1183 // The intents host attached to this view. Not lazily initialized. | 1196 // The intents host attached to this view. Not lazily initialized. |
| 1184 WebIntentsHost* intents_host_; | 1197 WebIntentsHost* intents_host_; |
| 1185 | 1198 |
| 1199 // The guest observer attached to this view. |
| 1200 GuestRenderViewObserver* guest_observer_; |
| 1201 |
| 1186 // The speech dispatcher attached to this view, lazily initialized. | 1202 // The speech dispatcher attached to this view, lazily initialized. |
| 1187 InputTagSpeechDispatcher* input_tag_speech_dispatcher_; | 1203 InputTagSpeechDispatcher* input_tag_speech_dispatcher_; |
| 1188 | 1204 |
| 1189 // Device orientation dispatcher attached to this view; lazily initialized. | 1205 // Device orientation dispatcher attached to this view; lazily initialized. |
| 1190 DeviceOrientationDispatcher* device_orientation_dispatcher_; | 1206 DeviceOrientationDispatcher* device_orientation_dispatcher_; |
| 1191 | 1207 |
| 1192 // MediaStream dispatcher attached to this view; lazily initialized. | 1208 // MediaStream dispatcher attached to this view; lazily initialized. |
| 1193 MediaStreamDispatcher* media_stream_dispatcher_; | 1209 MediaStreamDispatcher* media_stream_dispatcher_; |
| 1194 | 1210 |
| 1195 // MediaStreamImpl attached to this view; lazily initialized. | 1211 // MediaStreamImpl attached to this view; lazily initialized. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1278 | 1294 |
| 1279 #if defined(OS_WIN) | 1295 #if defined(OS_WIN) |
| 1280 // The ID of the focused NPAPI plug-in. | 1296 // The ID of the focused NPAPI plug-in. |
| 1281 int focused_plugin_id_; | 1297 int focused_plugin_id_; |
| 1282 #endif | 1298 #endif |
| 1283 | 1299 |
| 1284 // Allows JS to access DOM automation. The JS object is only exposed when the | 1300 // Allows JS to access DOM automation. The JS object is only exposed when the |
| 1285 // DOM automation bindings are enabled. | 1301 // DOM automation bindings are enabled. |
| 1286 scoped_ptr<DomAutomationController> dom_automation_controller_; | 1302 scoped_ptr<DomAutomationController> dom_automation_controller_; |
| 1287 | 1303 |
| 1304 // Indicates whether this RenderView is a guest. |
| 1305 bool guest_; |
| 1306 |
| 1288 // NOTE: pepper_delegate_ should be last member because its constructor calls | 1307 // NOTE: pepper_delegate_ should be last member because its constructor calls |
| 1289 // AddObservers method of RenderViewImpl from c-tor. | 1308 // AddObservers method of RenderViewImpl from c-tor. |
| 1290 PepperPluginDelegateImpl pepper_delegate_; | 1309 PepperPluginDelegateImpl pepper_delegate_; |
| 1291 | 1310 |
| 1292 // --------------------------------------------------------------------------- | 1311 // --------------------------------------------------------------------------- |
| 1293 // ADDING NEW DATA? Please see if it fits appropriately in one of the above | 1312 // ADDING NEW DATA? Please see if it fits appropriately in one of the above |
| 1294 // sections rather than throwing it randomly at the end. If you're adding a | 1313 // sections rather than throwing it randomly at the end. If you're adding a |
| 1295 // bunch of stuff, you should probably create a helper class and put your | 1314 // bunch of stuff, you should probably create a helper class and put your |
| 1296 // data and methods on that to avoid bloating RenderView more. You can | 1315 // data and methods on that to avoid bloating RenderView more. You can |
| 1297 // use the Observer interface to filter IPC messages and receive frame change | 1316 // use the Observer interface to filter IPC messages and receive frame change |
| 1298 // notifications. | 1317 // notifications. |
| 1299 // --------------------------------------------------------------------------- | 1318 // --------------------------------------------------------------------------- |
| 1300 | 1319 |
| 1301 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1320 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1302 }; | 1321 }; |
| 1303 | 1322 |
| 1304 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1323 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |