| 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_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_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 class DeviceOrientationDispatcher; | 57 class DeviceOrientationDispatcher; |
| 58 class DevToolsAgent; | 58 class DevToolsAgent; |
| 59 class DevToolsClient; | 59 class DevToolsClient; |
| 60 class DomAutomationController; | 60 class DomAutomationController; |
| 61 class ExternalHostBindings; | 61 class ExternalHostBindings; |
| 62 class ExternalPopupMenu; | 62 class ExternalPopupMenu; |
| 63 class FilePath; | 63 class FilePath; |
| 64 class GeolocationDispatcher; | 64 class GeolocationDispatcher; |
| 65 class GeolocationDispatcherOld; | 65 class GeolocationDispatcherOld; |
| 66 class GURL; | 66 class GURL; |
| 67 class ListValue; | |
| 68 class LoadProgressTracker; | 67 class LoadProgressTracker; |
| 69 class NavigationState; | 68 class NavigationState; |
| 70 class NotificationProvider; | 69 class NotificationProvider; |
| 71 class P2PSocketDispatcher; | 70 class P2PSocketDispatcher; |
| 72 class PepperDeviceTest; | 71 class PepperDeviceTest; |
| 73 class PrintWebViewHelper; | 72 class PrintWebViewHelper; |
| 74 class RenderViewObserver; | 73 class RenderViewObserver; |
| 75 class RenderViewVisitor; | 74 class RenderViewVisitor; |
| 76 class SearchBox; | 75 class SearchBox; |
| 77 class SkBitmap; | 76 class SkBitmap; |
| 78 class SpeechInputDispatcher; | 77 class SpeechInputDispatcher; |
| 79 class SpellCheckProvider; | 78 class SpellCheckProvider; |
| 80 class WebPluginDelegatePepper; | 79 class WebPluginDelegatePepper; |
| 81 class WebPluginDelegateProxy; | 80 class WebPluginDelegateProxy; |
| 82 class WebUIBindings; | 81 class WebUIBindings; |
| 83 struct ContextMenuMediaParams; | 82 struct ContextMenuMediaParams; |
| 83 struct ExtensionMsg_ExecuteCode_Params; |
| 84 struct PP_Flash_NetAddress; | 84 struct PP_Flash_NetAddress; |
| 85 struct ThumbnailScore; | 85 struct ThumbnailScore; |
| 86 struct ViewHostMsg_DomMessage_Params; | |
| 87 struct ViewHostMsg_GetSearchProviderInstallState_Params; | 86 struct ViewHostMsg_GetSearchProviderInstallState_Params; |
| 88 struct ViewHostMsg_PageHasOSDD_Type; | 87 struct ViewHostMsg_PageHasOSDD_Type; |
| 89 struct ViewHostMsg_RunFileChooser_Params; | 88 struct ViewHostMsg_RunFileChooser_Params; |
| 90 struct ViewMsg_ClosePage_Params; | 89 struct ViewMsg_ClosePage_Params; |
| 91 struct ViewMsg_ExecuteCode_Params; | |
| 92 struct ViewMsg_Navigate_Params; | 90 struct ViewMsg_Navigate_Params; |
| 93 struct ViewMsg_StopFinding_Params; | 91 struct ViewMsg_StopFinding_Params; |
| 94 struct WebApplicationInfo; | 92 struct WebApplicationInfo; |
| 95 struct WebDropData; | 93 struct WebDropData; |
| 96 | 94 |
| 97 namespace base { | 95 namespace base { |
| 98 class WaitableEvent; | 96 class WaitableEvent; |
| 99 } | 97 } |
| 100 | 98 |
| 101 namespace chrome { | 99 namespace chrome { |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 // the 'application shortcuts' feature where we pull the application | 303 // the 'application shortcuts' feature where we pull the application |
| 306 // definition out of optional meta tags in the page. | 304 // definition out of optional meta tags in the page. |
| 307 bool InstallWebApplicationUsingDefinitionFile(WebKit::WebFrame* frame, | 305 bool InstallWebApplicationUsingDefinitionFile(WebKit::WebFrame* frame, |
| 308 string16* error); | 306 string16* error); |
| 309 | 307 |
| 310 // Sets whether the renderer should report load progress to the browser. | 308 // Sets whether the renderer should report load progress to the browser. |
| 311 void SetReportLoadProgressEnabled(bool enabled); | 309 void SetReportLoadProgressEnabled(bool enabled); |
| 312 | 310 |
| 313 // Extensions ---------------------------------------------------------------- | 311 // Extensions ---------------------------------------------------------------- |
| 314 | 312 |
| 315 void SendExtensionRequest(const ViewHostMsg_DomMessage_Params& params); | |
| 316 | |
| 317 void OnExtensionResponse(int request_id, bool success, | |
| 318 const std::string& response, | |
| 319 const std::string& error); | |
| 320 | |
| 321 void OnSetExtensionViewMode(const std::string& mode); | |
| 322 | |
| 323 // Called when the "idle" user script state has been reached. See | 313 // Called when the "idle" user script state has been reached. See |
| 324 // UserScript::DOCUMENT_IDLE. | 314 // UserScript::DOCUMENT_IDLE. |
| 315 // TODO(jam): remove me |
| 325 void OnUserScriptIdleTriggered(WebKit::WebFrame* frame); | 316 void OnUserScriptIdleTriggered(WebKit::WebFrame* frame); |
| 326 | 317 |
| 327 // Plugin-related functions -------------------------------------------------- | 318 // Plugin-related functions -------------------------------------------------- |
| 328 // (See also WebPluginPageDelegate implementation.) | 319 // (See also WebPluginPageDelegate implementation.) |
| 329 | 320 |
| 330 // Notification that the given plugin has crashed. | 321 // Notification that the given plugin has crashed. |
| 331 void PluginCrashed(const FilePath& plugin_path); | 322 void PluginCrashed(const FilePath& plugin_path); |
| 332 | 323 |
| 333 // Notification that the default plugin has done something about a missing | 324 // Notification that the default plugin has done something about a missing |
| 334 // plugin. See default_plugin_shared.h for possible values of |status|. | 325 // plugin. See default_plugin_shared.h for possible values of |status|. |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 void OnDragTargetDragEnter(const WebDropData& drop_data, | 832 void OnDragTargetDragEnter(const WebDropData& drop_data, |
| 842 const gfx::Point& client_pt, | 833 const gfx::Point& client_pt, |
| 843 const gfx::Point& screen_pt, | 834 const gfx::Point& screen_pt, |
| 844 WebKit::WebDragOperationsMask operations_allowed); | 835 WebKit::WebDragOperationsMask operations_allowed); |
| 845 void OnDragTargetDragLeave(); | 836 void OnDragTargetDragLeave(); |
| 846 void OnDragTargetDragOver(const gfx::Point& client_pt, | 837 void OnDragTargetDragOver(const gfx::Point& client_pt, |
| 847 const gfx::Point& screen_pt, | 838 const gfx::Point& screen_pt, |
| 848 WebKit::WebDragOperationsMask operations_allowed); | 839 WebKit::WebDragOperationsMask operations_allowed); |
| 849 void OnEnablePreferredSizeChangedMode(int flags); | 840 void OnEnablePreferredSizeChangedMode(int flags); |
| 850 void OnEnableViewSourceMode(); | 841 void OnEnableViewSourceMode(); |
| 851 void OnExecuteCode(const ViewMsg_ExecuteCode_Params& params); | 842 void OnExecuteCode(const ExtensionMsg_ExecuteCode_Params& params); |
| 852 void OnExecuteEditCommand(const std::string& name, const std::string& value); | 843 void OnExecuteEditCommand(const std::string& name, const std::string& value); |
| 853 void OnExtensionMessageInvoke(const std::string& extension_id, | |
| 854 const std::string& function_name, | |
| 855 const ListValue& args, | |
| 856 const GURL& event_url); | |
| 857 void OnFileChooserResponse(const std::vector<FilePath>& paths); | 844 void OnFileChooserResponse(const std::vector<FilePath>& paths); |
| 858 void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&); | 845 void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&); |
| 859 void OnFindReplyAck(); | 846 void OnFindReplyAck(); |
| 860 void OnEnableAccessibility(); | 847 void OnEnableAccessibility(); |
| 861 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); | 848 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); |
| 862 void OnGetApplicationInfo(int page_id); | 849 void OnGetApplicationInfo(int page_id); |
| 863 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( | 850 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( |
| 864 const std::vector<GURL>& links, | 851 const std::vector<GURL>& links, |
| 865 const std::vector<FilePath>& local_paths, | 852 const std::vector<FilePath>& local_paths, |
| 866 const FilePath& local_directory_name); | 853 const FilePath& local_directory_name); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 // multiple frames, the frame whose size is image_size is returned. If the | 983 // multiple frames, the frame whose size is image_size is returned. If the |
| 997 // image doesn't have a frame at the specified size, the first is returned. | 984 // image doesn't have a frame at the specified size, the first is returned. |
| 998 bool DownloadImage(int id, const GURL& image_url, int image_size); | 985 bool DownloadImage(int id, const GURL& image_url, int image_size); |
| 999 | 986 |
| 1000 // Initializes the document_tag_ member if necessary. | 987 // Initializes the document_tag_ member if necessary. |
| 1001 void EnsureDocumentTag(); | 988 void EnsureDocumentTag(); |
| 1002 | 989 |
| 1003 // Backend for the IPC Message ExecuteCode in addition to being used | 990 // Backend for the IPC Message ExecuteCode in addition to being used |
| 1004 // internally by other RenderView functions. | 991 // internally by other RenderView functions. |
| 1005 void ExecuteCodeImpl(WebKit::WebFrame* frame, | 992 void ExecuteCodeImpl(WebKit::WebFrame* frame, |
| 1006 const ViewMsg_ExecuteCode_Params& params); | 993 const ExtensionMsg_ExecuteCode_Params& params); |
| 1007 | 994 |
| 1008 // Get all child frames of parent_frame, returned by frames_vector. | 995 // Get all child frames of parent_frame, returned by frames_vector. |
| 1009 bool GetAllChildFrames(WebKit::WebFrame* parent_frame, | 996 bool GetAllChildFrames(WebKit::WebFrame* parent_frame, |
| 1010 std::vector<WebKit::WebFrame* >* frames_vector) const; | 997 std::vector<WebKit::WebFrame* >* frames_vector) const; |
| 1011 | 998 |
| 1012 GURL GetAlternateErrorPageURL(const GURL& failed_url, | 999 GURL GetAlternateErrorPageURL(const GURL& failed_url, |
| 1013 ErrorPageType error_type); | 1000 ErrorPageType error_type); |
| 1014 | 1001 |
| 1015 // Locates a sub frame with given xpath | 1002 // Locates a sub frame with given xpath |
| 1016 WebKit::WebFrame* GetChildFrame(const std::wstring& frame_xpath) const; | 1003 WebKit::WebFrame* GetChildFrame(const std::wstring& frame_xpath) const; |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 | 1333 |
| 1347 // Misc ---------------------------------------------------------------------- | 1334 // Misc ---------------------------------------------------------------------- |
| 1348 | 1335 |
| 1349 // The current and pending file chooser completion objects. If the queue is | 1336 // The current and pending file chooser completion objects. If the queue is |
| 1350 // nonempty, the first item represents the currently running file chooser | 1337 // nonempty, the first item represents the currently running file chooser |
| 1351 // callback, and the remaining elements are the other file chooser completion | 1338 // callback, and the remaining elements are the other file chooser completion |
| 1352 // still waiting to be run (in order). | 1339 // still waiting to be run (in order). |
| 1353 struct PendingFileChooser; | 1340 struct PendingFileChooser; |
| 1354 std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_; | 1341 std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_; |
| 1355 | 1342 |
| 1356 std::queue<linked_ptr<ViewMsg_ExecuteCode_Params> > | 1343 std::queue<linked_ptr<ExtensionMsg_ExecuteCode_Params> > |
| 1357 pending_code_execution_queue_; | 1344 pending_code_execution_queue_; |
| 1358 | 1345 |
| 1359 // ImageResourceFetchers schedule via DownloadImage. | 1346 // ImageResourceFetchers schedule via DownloadImage. |
| 1360 ImageResourceFetcherList image_fetchers_; | 1347 ImageResourceFetcherList image_fetchers_; |
| 1361 | 1348 |
| 1362 // The app info that we are processing. This is used when installing an app | 1349 // The app info that we are processing. This is used when installing an app |
| 1363 // via application definition. The in-progress web app is stored here while | 1350 // via application definition. The in-progress web app is stored here while |
| 1364 // its manifest and icons are downloaded. | 1351 // its manifest and icons are downloaded. |
| 1365 scoped_ptr<WebApplicationInfo> pending_app_info_; | 1352 scoped_ptr<WebApplicationInfo> pending_app_info_; |
| 1366 | 1353 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 // bunch of stuff, you should probably create a helper class and put your | 1415 // bunch of stuff, you should probably create a helper class and put your |
| 1429 // data and methods on that to avoid bloating RenderView more. You can use | 1416 // data and methods on that to avoid bloating RenderView more. You can use |
| 1430 // the Observer interface to filter IPC messages and receive frame change | 1417 // the Observer interface to filter IPC messages and receive frame change |
| 1431 // notifications. | 1418 // notifications. |
| 1432 // --------------------------------------------------------------------------- | 1419 // --------------------------------------------------------------------------- |
| 1433 | 1420 |
| 1434 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1421 DISALLOW_COPY_AND_ASSIGN(RenderView); |
| 1435 }; | 1422 }; |
| 1436 | 1423 |
| 1437 #endif // CONTENT_RENDERER_RENDER_VIEW_H_ | 1424 #endif // CONTENT_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |