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