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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 | 180 |
177 // Returns the RenderViewImpl containing the given WebView. | 181 // Returns the RenderViewImpl containing the given WebView. |
178 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); | 182 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); |
179 | 183 |
180 // Sets the "next page id" counter. | 184 // Sets the "next page id" counter. |
181 static void SetNextPageID(int32 next_page_id); | 185 static void SetNextPageID(int32 next_page_id); |
182 | 186 |
183 // TODO(creis): Remove when we no longer need | 187 // TODO(creis): Remove when we no longer need |
184 // RenderThreadImpl::OnTempCrashWithData. | 188 // RenderThreadImpl::OnTempCrashWithData. |
185 static int32 next_page_id() { | 189 static int32 next_page_id() { |
186 return next_page_id_; | 190 return next_page_id_; |
tommi (sloooow) - chröme
2011/12/16 14:44:43
Is this a part of your change?
Henrik Grunell
2011/12/21 11:46:21
No, this is a merge.
| |
187 } | 191 } |
188 | 192 |
189 // May return NULL when the view is closing. | 193 // May return NULL when the view is closing. |
190 CONTENT_EXPORT WebKit::WebView* webview() const; | 194 CONTENT_EXPORT WebKit::WebView* webview() const; |
191 | 195 |
192 // Called by a GraphicsContext associated with this view when swapbuffers | 196 // Called by a GraphicsContext associated with this view when swapbuffers |
193 // is posted, completes or is aborted. | 197 // is posted, completes or is aborted. |
194 void OnViewContextSwapBuffersPosted(); | 198 void OnViewContextSwapBuffersPosted(); |
195 void OnViewContextSwapBuffersComplete(); | 199 void OnViewContextSwapBuffersComplete(); |
196 void OnViewContextSwapBuffersAborted(); | 200 void OnViewContextSwapBuffersAborted(); |
197 | 201 |
198 int history_list_offset() const { return history_list_offset_; } | 202 int history_list_offset() const { return history_list_offset_; } |
199 | 203 |
200 const WebPreferences& webkit_preferences() const { | 204 const WebPreferences& webkit_preferences() const { |
201 return webkit_preferences_; | 205 return webkit_preferences_; |
202 } | 206 } |
203 | 207 |
204 void set_send_content_state_immediately(bool value) { | 208 void set_send_content_state_immediately(bool value) { |
205 send_content_state_immediately_ = value; | 209 send_content_state_immediately_ = value; |
206 } | 210 } |
207 | 211 |
212 MediaStreamDispatcher* media_stream_dispatcher() { | |
213 return media_stream_dispatcher_; | |
214 } | |
215 | |
208 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled. | 216 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled. |
209 content::P2PSocketDispatcher* p2p_socket_dispatcher() { | 217 content::P2PSocketDispatcher* p2p_socket_dispatcher() { |
210 return p2p_socket_dispatcher_; | 218 return p2p_socket_dispatcher_; |
211 } | 219 } |
212 | 220 |
221 WebKit::WebPeerConnectionHandler* CreatePeerConnectionHandler( | |
222 WebKit::WebPeerConnectionHandlerClient* client); | |
223 | |
213 // Functions to add and remove observers for this object. | 224 // Functions to add and remove observers for this object. |
214 void AddObserver(content::RenderViewObserver* observer); | 225 void AddObserver(content::RenderViewObserver* observer); |
215 void RemoveObserver(content::RenderViewObserver* observer); | 226 void RemoveObserver(content::RenderViewObserver* observer); |
216 | 227 |
217 // Adds the given file chooser request to the file_chooser_completion_ queue | 228 // Adds the given file chooser request to the file_chooser_completion_ queue |
218 // (see that var for more) and requests the chooser be displayed if there are | 229 // (see that var for more) and requests the chooser be displayed if there are |
219 // no other waiting items in the queue. | 230 // no other waiting items in the queue. |
220 // | 231 // |
221 // Returns true if the chooser was successfully scheduled. False means we | 232 // Returns true if the chooser was successfully scheduled. False means we |
222 // didn't schedule anything. | 233 // didn't schedule anything. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
383 virtual WebKit::WebSpeechInputController* speechInputController( | 394 virtual WebKit::WebSpeechInputController* speechInputController( |
384 WebKit::WebSpeechInputListener* listener); | 395 WebKit::WebSpeechInputListener* listener); |
385 virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient(); | 396 virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient(); |
386 virtual void zoomLimitsChanged(double minimum_level, double maximum_level); | 397 virtual void zoomLimitsChanged(double minimum_level, double maximum_level); |
387 virtual void zoomLevelChanged(); | 398 virtual void zoomLevelChanged(); |
388 virtual void registerProtocolHandler(const WebKit::WebString& scheme, | 399 virtual void registerProtocolHandler(const WebKit::WebString& scheme, |
389 const WebKit::WebString& base_url, | 400 const WebKit::WebString& base_url, |
390 const WebKit::WebString& url, | 401 const WebKit::WebString& url, |
391 const WebKit::WebString& title); | 402 const WebKit::WebString& title); |
392 virtual WebKit::WebPageVisibilityState visibilityState() const; | 403 virtual WebKit::WebPageVisibilityState visibilityState() const; |
404 virtual WebKit::WebUserMediaClient* userMediaClient(); | |
393 | 405 |
394 // WebKit::WebFrameClient implementation ------------------------------------- | 406 // WebKit::WebFrameClient implementation ------------------------------------- |
395 | 407 |
396 virtual WebKit::WebPlugin* createPlugin( | 408 virtual WebKit::WebPlugin* createPlugin( |
397 WebKit::WebFrame* frame, | 409 WebKit::WebFrame* frame, |
398 const WebKit::WebPluginParams& params); | 410 const WebKit::WebPluginParams& params); |
399 virtual WebKit::WebSharedWorker* createSharedWorker( | 411 virtual WebKit::WebSharedWorker* createSharedWorker( |
400 WebKit::WebFrame* frame, const WebKit::WebURL& url, | 412 WebKit::WebFrame* frame, const WebKit::WebURL& url, |
401 const WebKit::WebString& name, unsigned long long documentId); | 413 const WebKit::WebString& name, unsigned long long documentId); |
402 virtual WebKit::WebMediaPlayer* createMediaPlayer( | 414 virtual WebKit::WebMediaPlayer* createMediaPlayer( |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
866 void ZoomFactorHelper(content::PageZoom zoom, int zoom_center_x, | 878 void ZoomFactorHelper(content::PageZoom zoom, int zoom_center_x, |
867 int zoom_center_y, float scaling_increment); | 879 int zoom_center_y, float scaling_increment); |
868 | 880 |
869 void AltErrorPageFinished(WebKit::WebFrame* frame, | 881 void AltErrorPageFinished(WebKit::WebFrame* frame, |
870 const WebKit::WebURLError& original_error, | 882 const WebKit::WebURLError& original_error, |
871 const std::string& html); | 883 const std::string& html); |
872 | 884 |
873 // Check whether the preferred size has changed. | 885 // Check whether the preferred size has changed. |
874 void CheckPreferredSize(); | 886 void CheckPreferredSize(); |
875 | 887 |
888 void EnsureMediaStreamImpl(); | |
889 | |
876 // This callback is triggered when DownloadFavicon completes, either | 890 // This callback is triggered when DownloadFavicon completes, either |
877 // succesfully or with a failure. See DownloadFavicon for more | 891 // succesfully or with a failure. See DownloadFavicon for more |
878 // details. | 892 // details. |
879 void DidDownloadFavicon(webkit_glue::ImageResourceFetcher* fetcher, | 893 void DidDownloadFavicon(webkit_glue::ImageResourceFetcher* fetcher, |
880 const SkBitmap& image); | 894 const SkBitmap& image); |
881 | 895 |
882 // Requests to download a favicon image. When done, the RenderView is notified | 896 // Requests to download a favicon image. When done, the RenderView is notified |
883 // by way of DidDownloadFavicon. Returns true if the request was successfully | 897 // by way of DidDownloadFavicon. Returns true if the request was successfully |
884 // started, false otherwise. id is used to uniquely identify the request and | 898 // started, false otherwise. id is used to uniquely identify the request and |
885 // passed back to the DidDownloadFavicon method. If the image has multiple | 899 // passed back to the DidDownloadFavicon method. If the image has multiple |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1127 | 1141 |
1128 // The intents dispatcher attached to this view. Not lazily initialized. | 1142 // The intents dispatcher attached to this view. Not lazily initialized. |
1129 IntentsDispatcher* intents_dispatcher_; | 1143 IntentsDispatcher* intents_dispatcher_; |
1130 | 1144 |
1131 // The speech dispatcher attached to this view, lazily initialized. | 1145 // The speech dispatcher attached to this view, lazily initialized. |
1132 SpeechInputDispatcher* speech_input_dispatcher_; | 1146 SpeechInputDispatcher* speech_input_dispatcher_; |
1133 | 1147 |
1134 // Device orientation dispatcher attached to this view; lazily initialized. | 1148 // Device orientation dispatcher attached to this view; lazily initialized. |
1135 DeviceOrientationDispatcher* device_orientation_dispatcher_; | 1149 DeviceOrientationDispatcher* device_orientation_dispatcher_; |
1136 | 1150 |
1151 // MediaStream dispatcher attached to this view; lazily initialized. | |
1152 MediaStreamDispatcher* media_stream_dispatcher_; | |
1153 | |
1137 // MediaStreamImpl attached to this view; lazily initialized. | 1154 // MediaStreamImpl attached to this view; lazily initialized. |
1138 scoped_refptr<MediaStreamImpl> media_stream_impl_; | 1155 scoped_refptr<MediaStreamImpl> media_stream_impl_; |
1139 | 1156 |
1140 // Dispatches all P2P socket used by the renderer. | 1157 // Dispatches all P2P socket used by the renderer. |
1141 content::P2PSocketDispatcher* p2p_socket_dispatcher_; | 1158 content::P2PSocketDispatcher* p2p_socket_dispatcher_; |
1142 | 1159 |
1143 DevToolsAgent* devtools_agent_; | 1160 DevToolsAgent* devtools_agent_; |
1144 | 1161 |
1145 RendererAccessibility* renderer_accessibility_; | 1162 RendererAccessibility* renderer_accessibility_; |
1146 | 1163 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1227 // bunch of stuff, you should probably create a helper class and put your | 1244 // bunch of stuff, you should probably create a helper class and put your |
1228 // data and methods on that to avoid bloating RenderView more. You can | 1245 // data and methods on that to avoid bloating RenderView more. You can |
1229 // use the Observer interface to filter IPC messages and receive frame change | 1246 // use the Observer interface to filter IPC messages and receive frame change |
1230 // notifications. | 1247 // notifications. |
1231 // --------------------------------------------------------------------------- | 1248 // --------------------------------------------------------------------------- |
1232 | 1249 |
1233 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1250 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
1234 }; | 1251 }; |
1235 | 1252 |
1236 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1253 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |