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