| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; | 67 class MediaStreamDispatcher; |
| 68 class MediaStreamImpl; | 68 class MediaStreamImpl; |
| 69 class MouseLockDispatcher; |
| 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; |
| 78 struct ViewMsg_SwapOut_Params; | 79 struct ViewMsg_SwapOut_Params; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 206 |
| 206 MediaStreamDispatcher* media_stream_dispatcher() { | 207 MediaStreamDispatcher* media_stream_dispatcher() { |
| 207 return media_stream_dispatcher_; | 208 return media_stream_dispatcher_; |
| 208 } | 209 } |
| 209 | 210 |
| 210 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled. | 211 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled. |
| 211 content::P2PSocketDispatcher* p2p_socket_dispatcher() { | 212 content::P2PSocketDispatcher* p2p_socket_dispatcher() { |
| 212 return p2p_socket_dispatcher_; | 213 return p2p_socket_dispatcher_; |
| 213 } | 214 } |
| 214 | 215 |
| 216 MouseLockDispatcher* mouse_lock_dispatcher() { |
| 217 return mouse_lock_dispatcher_; |
| 218 } |
| 219 |
| 215 WebKit::WebPeerConnectionHandler* CreatePeerConnectionHandler( | 220 WebKit::WebPeerConnectionHandler* CreatePeerConnectionHandler( |
| 216 WebKit::WebPeerConnectionHandlerClient* client); | 221 WebKit::WebPeerConnectionHandlerClient* client); |
| 217 | 222 |
| 218 // Functions to add and remove observers for this object. | 223 // Functions to add and remove observers for this object. |
| 219 void AddObserver(content::RenderViewObserver* observer); | 224 void AddObserver(content::RenderViewObserver* observer); |
| 220 void RemoveObserver(content::RenderViewObserver* observer); | 225 void RemoveObserver(content::RenderViewObserver* observer); |
| 221 | 226 |
| 222 // Adds the given file chooser request to the file_chooser_completion_ queue | 227 // Adds the given file chooser request to the file_chooser_completion_ queue |
| 223 // (see that var for more) and requests the chooser be displayed if there are | 228 // (see that var for more) and requests the chooser be displayed if there are |
| 224 // no other waiting items in the queue. | 229 // no other waiting items in the queue. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 314 |
| 310 // WebKit::WebWidgetClient implementation ------------------------------------ | 315 // WebKit::WebWidgetClient implementation ------------------------------------ |
| 311 | 316 |
| 312 // Most methods are handled by RenderWidget. | 317 // Most methods are handled by RenderWidget. |
| 313 virtual void didFocus(); | 318 virtual void didFocus(); |
| 314 virtual void didBlur(); | 319 virtual void didBlur(); |
| 315 virtual void show(WebKit::WebNavigationPolicy policy); | 320 virtual void show(WebKit::WebNavigationPolicy policy); |
| 316 virtual void runModal(); | 321 virtual void runModal(); |
| 317 virtual bool enterFullScreen(); | 322 virtual bool enterFullScreen(); |
| 318 virtual void exitFullScreen(); | 323 virtual void exitFullScreen(); |
| 324 virtual bool requestPointerLock(); |
| 325 virtual void requestPointerUnlock(); |
| 326 virtual bool isPointerLocked(); |
| 319 | 327 |
| 320 // WebKit::WebViewClient implementation -------------------------------------- | 328 // WebKit::WebViewClient implementation -------------------------------------- |
| 321 | 329 |
| 322 virtual WebKit::WebView* createView( | 330 virtual WebKit::WebView* createView( |
| 323 WebKit::WebFrame* creator, | 331 WebKit::WebFrame* creator, |
| 324 const WebKit::WebURLRequest& request, | 332 const WebKit::WebURLRequest& request, |
| 325 const WebKit::WebWindowFeatures& features, | 333 const WebKit::WebWindowFeatures& features, |
| 326 const WebKit::WebString& frame_name); | 334 const WebKit::WebString& frame_name); |
| 327 virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType popup_type); | 335 virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType popup_type); |
| 328 virtual WebKit::WebWidget* createPopupMenu( | 336 virtual WebKit::WebWidget* createPopupMenu( |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 void OnEnumerateDirectoryResponse(int id, const std::vector<FilePath>& paths); | 807 void OnEnumerateDirectoryResponse(int id, const std::vector<FilePath>& paths); |
| 800 void OnExecuteEditCommand(const std::string& name, const std::string& value); | 808 void OnExecuteEditCommand(const std::string& name, const std::string& value); |
| 801 void OnFileChooserResponse(const std::vector<FilePath>& paths); | 809 void OnFileChooserResponse(const std::vector<FilePath>& paths); |
| 802 void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&); | 810 void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&); |
| 803 void OnFindReplyAck(); | 811 void OnFindReplyAck(); |
| 804 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); | 812 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); |
| 805 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( | 813 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( |
| 806 const std::vector<GURL>& links, | 814 const std::vector<GURL>& links, |
| 807 const std::vector<FilePath>& local_paths, | 815 const std::vector<FilePath>& local_paths, |
| 808 const FilePath& local_directory_name); | 816 const FilePath& local_directory_name); |
| 809 void OnLockMouseACK(bool succeeded); | |
| 810 void OnMediaPlayerActionAt(const gfx::Point& location, | 817 void OnMediaPlayerActionAt(const gfx::Point& location, |
| 811 const WebKit::WebMediaPlayerAction& action); | 818 const WebKit::WebMediaPlayerAction& action); |
| 812 void OnPluginActionAt(const gfx::Point& location, | 819 void OnPluginActionAt(const gfx::Point& location, |
| 813 const WebKit::WebPluginAction& action); | 820 const WebKit::WebPluginAction& action); |
| 814 void OnMouseLockLost(); | |
| 815 void OnMoveOrResizeStarted(); | 821 void OnMoveOrResizeStarted(); |
| 816 CONTENT_EXPORT void OnNavigate(const ViewMsg_Navigate_Params& params); | 822 CONTENT_EXPORT void OnNavigate(const ViewMsg_Navigate_Params& params); |
| 817 void OnPaste(); | 823 void OnPaste(); |
| 818 void OnPasteAndMatchStyle(); | 824 void OnPasteAndMatchStyle(); |
| 819 #if defined(OS_MACOSX) | 825 #if defined(OS_MACOSX) |
| 820 void OnPluginImeCompositionCompleted(const string16& text, int plugin_id); | 826 void OnPluginImeCompositionCompleted(const string16& text, int plugin_id); |
| 821 #endif | 827 #endif |
| 822 void OnRedo(); | 828 void OnRedo(); |
| 823 void OnReloadFrame(); | 829 void OnReloadFrame(); |
| 824 void OnReplace(const string16& text); | 830 void OnReplace(const string16& text); |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 // Dispatches all P2P socket used by the renderer. | 1163 // Dispatches all P2P socket used by the renderer. |
| 1158 content::P2PSocketDispatcher* p2p_socket_dispatcher_; | 1164 content::P2PSocketDispatcher* p2p_socket_dispatcher_; |
| 1159 | 1165 |
| 1160 DevToolsAgent* devtools_agent_; | 1166 DevToolsAgent* devtools_agent_; |
| 1161 | 1167 |
| 1162 RendererAccessibility* renderer_accessibility_; | 1168 RendererAccessibility* renderer_accessibility_; |
| 1163 | 1169 |
| 1164 // Java Bridge dispatcher attached to this view; lazily initialized. | 1170 // Java Bridge dispatcher attached to this view; lazily initialized. |
| 1165 scoped_ptr<JavaBridgeDispatcher> java_bridge_dispatcher_; | 1171 scoped_ptr<JavaBridgeDispatcher> java_bridge_dispatcher_; |
| 1166 | 1172 |
| 1173 // Mouse Lock dispatcher attached to this view. |
| 1174 MouseLockDispatcher* mouse_lock_dispatcher_; |
| 1175 |
| 1167 // Misc ---------------------------------------------------------------------- | 1176 // Misc ---------------------------------------------------------------------- |
| 1168 | 1177 |
| 1169 // The current and pending file chooser completion objects. If the queue is | 1178 // The current and pending file chooser completion objects. If the queue is |
| 1170 // nonempty, the first item represents the currently running file chooser | 1179 // nonempty, the first item represents the currently running file chooser |
| 1171 // callback, and the remaining elements are the other file chooser completion | 1180 // callback, and the remaining elements are the other file chooser completion |
| 1172 // still waiting to be run (in order). | 1181 // still waiting to be run (in order). |
| 1173 struct PendingFileChooser; | 1182 struct PendingFileChooser; |
| 1174 std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_; | 1183 std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_; |
| 1175 | 1184 |
| 1176 // The current directory enumeration callback | 1185 // The current directory enumeration callback |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1215 scoped_ptr<LoadProgressTracker> load_progress_tracker_; | 1224 scoped_ptr<LoadProgressTracker> load_progress_tracker_; |
| 1216 | 1225 |
| 1217 // All the registered observers. We expect this list to be small, so vector | 1226 // All the registered observers. We expect this list to be small, so vector |
| 1218 // is fine. | 1227 // is fine. |
| 1219 ObserverList<content::RenderViewObserver> observers_; | 1228 ObserverList<content::RenderViewObserver> observers_; |
| 1220 | 1229 |
| 1221 // Used to inform didChangeSelection() when it is called in the context | 1230 // Used to inform didChangeSelection() when it is called in the context |
| 1222 // of handling a ViewMsg_SelectRange IPC. | 1231 // of handling a ViewMsg_SelectRange IPC. |
| 1223 bool handling_select_range_; | 1232 bool handling_select_range_; |
| 1224 | 1233 |
| 1234 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. |
| 1235 scoped_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; |
| 1236 |
| 1225 // Plugins ------------------------------------------------------------------- | 1237 // Plugins ------------------------------------------------------------------- |
| 1226 | 1238 |
| 1227 // All the currently active plugin delegates for this RenderView; kept so | 1239 // All the currently active plugin delegates for this RenderView; kept so |
| 1228 // that we can enumerate them to send updates about things like window | 1240 // that we can enumerate them to send updates about things like window |
| 1229 // location or tab focus and visibily. These are non-owning references. | 1241 // location or tab focus and visibily. These are non-owning references. |
| 1230 std::set<WebPluginDelegateProxy*> plugin_delegates_; | 1242 std::set<WebPluginDelegateProxy*> plugin_delegates_; |
| 1231 | 1243 |
| 1232 #if defined(OS_WIN) | 1244 #if defined(OS_WIN) |
| 1233 // The ID of the focused NPAPI plug-in. | 1245 // The ID of the focused NPAPI plug-in. |
| 1234 int focused_plugin_id_; | 1246 int focused_plugin_id_; |
| 1235 #endif | 1247 #endif |
| 1236 | 1248 |
| 1237 // NOTE: pepper_delegate_ should be last member because its constructor calls | 1249 // NOTE: pepper_delegate_ should be last member because its constructor calls |
| 1238 // AddObservers method of RenderViewImpl from c-tor. | 1250 // AddObservers method of RenderViewImpl from c-tor. |
| 1239 PepperPluginDelegateImpl pepper_delegate_; | 1251 PepperPluginDelegateImpl pepper_delegate_; |
| 1240 | 1252 |
| 1241 // --------------------------------------------------------------------------- | 1253 // --------------------------------------------------------------------------- |
| 1242 // ADDING NEW DATA? Please see if it fits appropriately in one of the above | 1254 // ADDING NEW DATA? Please see if it fits appropriately in one of the above |
| 1243 // sections rather than throwing it randomly at the end. If you're adding a | 1255 // sections rather than throwing it randomly at the end. If you're adding a |
| 1244 // bunch of stuff, you should probably create a helper class and put your | 1256 // bunch of stuff, you should probably create a helper class and put your |
| 1245 // data and methods on that to avoid bloating RenderView more. You can | 1257 // data and methods on that to avoid bloating RenderView more. You can |
| 1246 // use the Observer interface to filter IPC messages and receive frame change | 1258 // use the Observer interface to filter IPC messages and receive frame change |
| 1247 // notifications. | 1259 // notifications. |
| 1248 // --------------------------------------------------------------------------- | 1260 // --------------------------------------------------------------------------- |
| 1249 | 1261 |
| 1250 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1262 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1251 }; | 1263 }; |
| 1252 | 1264 |
| 1253 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1265 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |