| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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> |
| 11 #include <queue> | 11 #include <queue> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 #pragma warning(disable: 4250) | 57 #pragma warning(disable: 4250) |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 class DeviceOrientationDispatcher; | 60 class DeviceOrientationDispatcher; |
| 61 class DevToolsAgent; | 61 class DevToolsAgent; |
| 62 class ExternalPopupMenu; | 62 class ExternalPopupMenu; |
| 63 class GeolocationDispatcher; | 63 class GeolocationDispatcher; |
| 64 class GURL; | 64 class GURL; |
| 65 class JavaBridgeDispatcher; | 65 class JavaBridgeDispatcher; |
| 66 class LoadProgressTracker; | 66 class LoadProgressTracker; |
| 67 class MediaStreamDispatcher; | |
| 68 class MediaStreamImpl; | 67 class MediaStreamImpl; |
| 69 class NotificationProvider; | 68 class NotificationProvider; |
| 70 class PepperDeviceTest; | 69 class PepperDeviceTest; |
| 71 struct PP_NetAddress_Private; | 70 struct PP_NetAddress_Private; |
| 72 class RenderWidgetFullscreenPepper; | 71 class RenderWidgetFullscreenPepper; |
| 73 class RendererAccessibility; | 72 class RendererAccessibility; |
| 74 class SkBitmap; | 73 class SkBitmap; |
| 75 class SpeechInputDispatcher; | 74 class SpeechInputDispatcher; |
| 76 struct ViewMsg_Navigate_Params; | 75 struct ViewMsg_Navigate_Params; |
| 77 struct ViewMsg_StopFinding_Params; | 76 struct ViewMsg_StopFinding_Params; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 class WebApplicationCacheHost; | 111 class WebApplicationCacheHost; |
| 113 class WebApplicationCacheHostClient; | 112 class WebApplicationCacheHostClient; |
| 114 class WebDataSource; | 113 class WebDataSource; |
| 115 class WebDragData; | 114 class WebDragData; |
| 116 class WebGeolocationClient; | 115 class WebGeolocationClient; |
| 117 class WebIconURL; | 116 class WebIconURL; |
| 118 class WebImage; | 117 class WebImage; |
| 119 class WebMediaPlayer; | 118 class WebMediaPlayer; |
| 120 class WebMediaPlayerClient; | 119 class WebMediaPlayerClient; |
| 121 class WebMouseEvent; | 120 class WebMouseEvent; |
| 122 class WebPeerConnectionHandler; | |
| 123 class WebPeerConnectionHandlerClient; | |
| 124 class WebSpeechInputController; | 121 class WebSpeechInputController; |
| 125 class WebSpeechInputListener; | 122 class WebSpeechInputListener; |
| 126 class WebStorageNamespace; | 123 class WebStorageNamespace; |
| 127 class WebTouchEvent; | 124 class WebTouchEvent; |
| 128 class WebURLLoader; | 125 class WebURLLoader; |
| 129 class WebURLRequest; | 126 class WebURLRequest; |
| 130 class WebUserMediaClient; | |
| 131 struct WebFileChooserParams; | 127 struct WebFileChooserParams; |
| 132 struct WebFindOptions; | 128 struct WebFindOptions; |
| 133 struct WebMediaPlayerAction; | 129 struct WebMediaPlayerAction; |
| 134 struct WebPoint; | 130 struct WebPoint; |
| 135 struct WebWindowFeatures; | 131 struct WebWindowFeatures; |
| 136 } | 132 } |
| 137 | 133 |
| 138 // We need to prevent a page from trying to create infinite popups. It is not | 134 // We need to prevent a page from trying to create infinite popups. It is not |
| 139 // as simple as keeping a count of the number of immediate children | 135 // as simple as keeping a count of the number of immediate children |
| 140 // popups. Having an html file that window.open()s itself would create | 136 // popups. Having an html file that window.open()s itself would create |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 int history_list_offset() const { return history_list_offset_; } | 190 int history_list_offset() const { return history_list_offset_; } |
| 195 | 191 |
| 196 const WebPreferences& webkit_preferences() const { | 192 const WebPreferences& webkit_preferences() const { |
| 197 return webkit_preferences_; | 193 return webkit_preferences_; |
| 198 } | 194 } |
| 199 | 195 |
| 200 void set_send_content_state_immediately(bool value) { | 196 void set_send_content_state_immediately(bool value) { |
| 201 send_content_state_immediately_ = value; | 197 send_content_state_immediately_ = value; |
| 202 } | 198 } |
| 203 | 199 |
| 204 MediaStreamDispatcher* media_stream_dispatcher() { | |
| 205 return media_stream_dispatcher_; | |
| 206 } | |
| 207 | |
| 208 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled. | 200 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled. |
| 209 content::P2PSocketDispatcher* p2p_socket_dispatcher() { | 201 content::P2PSocketDispatcher* p2p_socket_dispatcher() { |
| 210 return p2p_socket_dispatcher_; | 202 return p2p_socket_dispatcher_; |
| 211 } | 203 } |
| 212 | 204 |
| 213 WebKit::WebPeerConnectionHandler* CreatePeerConnectionHandler( | |
| 214 WebKit::WebPeerConnectionHandlerClient* client); | |
| 215 | |
| 216 // Functions to add and remove observers for this object. | 205 // Functions to add and remove observers for this object. |
| 217 void AddObserver(content::RenderViewObserver* observer); | 206 void AddObserver(content::RenderViewObserver* observer); |
| 218 void RemoveObserver(content::RenderViewObserver* observer); | 207 void RemoveObserver(content::RenderViewObserver* observer); |
| 219 | 208 |
| 220 // Adds the given file chooser request to the file_chooser_completion_ queue | 209 // Adds the given file chooser request to the file_chooser_completion_ queue |
| 221 // (see that var for more) and requests the chooser be displayed if there are | 210 // (see that var for more) and requests the chooser be displayed if there are |
| 222 // no other waiting items in the queue. | 211 // no other waiting items in the queue. |
| 223 // | 212 // |
| 224 // Returns true if the chooser was successfully scheduled. False means we | 213 // Returns true if the chooser was successfully scheduled. False means we |
| 225 // didn't schedule anything. | 214 // didn't schedule anything. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 virtual WebKit::WebSpeechInputController* speechInputController( | 375 virtual WebKit::WebSpeechInputController* speechInputController( |
| 387 WebKit::WebSpeechInputListener* listener); | 376 WebKit::WebSpeechInputListener* listener); |
| 388 virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient(); | 377 virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient(); |
| 389 virtual void zoomLimitsChanged(double minimum_level, double maximum_level); | 378 virtual void zoomLimitsChanged(double minimum_level, double maximum_level); |
| 390 virtual void zoomLevelChanged(); | 379 virtual void zoomLevelChanged(); |
| 391 virtual void registerProtocolHandler(const WebKit::WebString& scheme, | 380 virtual void registerProtocolHandler(const WebKit::WebString& scheme, |
| 392 const WebKit::WebString& base_url, | 381 const WebKit::WebString& base_url, |
| 393 const WebKit::WebString& url, | 382 const WebKit::WebString& url, |
| 394 const WebKit::WebString& title); | 383 const WebKit::WebString& title); |
| 395 virtual WebKit::WebPageVisibilityState visibilityState() const; | 384 virtual WebKit::WebPageVisibilityState visibilityState() const; |
| 396 virtual WebKit::WebUserMediaClient* userMediaClient(); | |
| 397 | 385 |
| 398 // WebKit::WebFrameClient implementation ------------------------------------- | 386 // WebKit::WebFrameClient implementation ------------------------------------- |
| 399 | 387 |
| 400 virtual WebKit::WebPlugin* createPlugin( | 388 virtual WebKit::WebPlugin* createPlugin( |
| 401 WebKit::WebFrame* frame, | 389 WebKit::WebFrame* frame, |
| 402 const WebKit::WebPluginParams& params); | 390 const WebKit::WebPluginParams& params); |
| 403 virtual WebKit::WebSharedWorker* createSharedWorker( | 391 virtual WebKit::WebSharedWorker* createSharedWorker( |
| 404 WebKit::WebFrame* frame, const WebKit::WebURL& url, | 392 WebKit::WebFrame* frame, const WebKit::WebURL& url, |
| 405 const WebKit::WebString& name, unsigned long long documentId); | 393 const WebKit::WebString& name, unsigned long long documentId); |
| 406 virtual WebKit::WebMediaPlayer* createMediaPlayer( | 394 virtual WebKit::WebMediaPlayer* createMediaPlayer( |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 void ZoomFactorHelper(content::PageZoom zoom, int zoom_center_x, | 858 void ZoomFactorHelper(content::PageZoom zoom, int zoom_center_x, |
| 871 int zoom_center_y, float scaling_increment); | 859 int zoom_center_y, float scaling_increment); |
| 872 | 860 |
| 873 void AltErrorPageFinished(WebKit::WebFrame* frame, | 861 void AltErrorPageFinished(WebKit::WebFrame* frame, |
| 874 const WebKit::WebURLError& original_error, | 862 const WebKit::WebURLError& original_error, |
| 875 const std::string& html); | 863 const std::string& html); |
| 876 | 864 |
| 877 // Check whether the preferred size has changed. | 865 // Check whether the preferred size has changed. |
| 878 void CheckPreferredSize(); | 866 void CheckPreferredSize(); |
| 879 | 867 |
| 880 void EnsureMediaStreamImpl(); | |
| 881 | |
| 882 // This callback is triggered when DownloadFavicon completes, either | 868 // This callback is triggered when DownloadFavicon completes, either |
| 883 // succesfully or with a failure. See DownloadFavicon for more | 869 // succesfully or with a failure. See DownloadFavicon for more |
| 884 // details. | 870 // details. |
| 885 void DidDownloadFavicon(webkit_glue::ImageResourceFetcher* fetcher, | 871 void DidDownloadFavicon(webkit_glue::ImageResourceFetcher* fetcher, |
| 886 const SkBitmap& image); | 872 const SkBitmap& image); |
| 887 | 873 |
| 888 // Requests to download a favicon image. When done, the RenderView is notified | 874 // Requests to download a favicon image. When done, the RenderView is notified |
| 889 // by way of DidDownloadFavicon. Returns true if the request was successfully | 875 // by way of DidDownloadFavicon. Returns true if the request was successfully |
| 890 // started, false otherwise. id is used to uniquely identify the request and | 876 // started, false otherwise. id is used to uniquely identify the request and |
| 891 // passed back to the DidDownloadFavicon method. If the image has multiple | 877 // passed back to the DidDownloadFavicon method. If the image has multiple |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 | 1119 |
| 1134 // The intents host attached to this view. Not lazily initialized. | 1120 // The intents host attached to this view. Not lazily initialized. |
| 1135 WebIntentsHost* intents_host_; | 1121 WebIntentsHost* intents_host_; |
| 1136 | 1122 |
| 1137 // The speech dispatcher attached to this view, lazily initialized. | 1123 // The speech dispatcher attached to this view, lazily initialized. |
| 1138 SpeechInputDispatcher* speech_input_dispatcher_; | 1124 SpeechInputDispatcher* speech_input_dispatcher_; |
| 1139 | 1125 |
| 1140 // Device orientation dispatcher attached to this view; lazily initialized. | 1126 // Device orientation dispatcher attached to this view; lazily initialized. |
| 1141 DeviceOrientationDispatcher* device_orientation_dispatcher_; | 1127 DeviceOrientationDispatcher* device_orientation_dispatcher_; |
| 1142 | 1128 |
| 1143 // MediaStream dispatcher attached to this view; lazily initialized. | |
| 1144 MediaStreamDispatcher* media_stream_dispatcher_; | |
| 1145 | |
| 1146 // MediaStreamImpl attached to this view; lazily initialized. | 1129 // MediaStreamImpl attached to this view; lazily initialized. |
| 1147 scoped_refptr<MediaStreamImpl> media_stream_impl_; | 1130 scoped_refptr<MediaStreamImpl> media_stream_impl_; |
| 1148 | 1131 |
| 1149 // Dispatches all P2P socket used by the renderer. | 1132 // Dispatches all P2P socket used by the renderer. |
| 1150 content::P2PSocketDispatcher* p2p_socket_dispatcher_; | 1133 content::P2PSocketDispatcher* p2p_socket_dispatcher_; |
| 1151 | 1134 |
| 1152 DevToolsAgent* devtools_agent_; | 1135 DevToolsAgent* devtools_agent_; |
| 1153 | 1136 |
| 1154 RendererAccessibility* renderer_accessibility_; | 1137 RendererAccessibility* renderer_accessibility_; |
| 1155 | 1138 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1236 // bunch of stuff, you should probably create a helper class and put your | 1219 // bunch of stuff, you should probably create a helper class and put your |
| 1237 // data and methods on that to avoid bloating RenderView more. You can | 1220 // data and methods on that to avoid bloating RenderView more. You can |
| 1238 // use the Observer interface to filter IPC messages and receive frame change | 1221 // use the Observer interface to filter IPC messages and receive frame change |
| 1239 // notifications. | 1222 // notifications. |
| 1240 // --------------------------------------------------------------------------- | 1223 // --------------------------------------------------------------------------- |
| 1241 | 1224 |
| 1242 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1225 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1243 }; | 1226 }; |
| 1244 | 1227 |
| 1245 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1228 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |