OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ |
6 #define CHROME_RENDERER_RENDER_VIEW_H_ | 6 #define CHROME_RENDERER_RENDER_VIEW_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "app/surface/transport_dib.h" | 15 #include "app/surface/transport_dib.h" |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/file_path.h" | 17 #include "base/file_path.h" |
18 #include "base/id_map.h" | 18 #include "base/id_map.h" |
19 #include "base/linked_ptr.h" | 19 #include "base/linked_ptr.h" |
20 #include "base/shared_memory.h" | 20 #include "base/shared_memory.h" |
21 #include "base/timer.h" | 21 #include "base/timer.h" |
22 #include "base/values.h" | 22 #include "base/values.h" |
23 #include "base/weak_ptr.h" | 23 #include "base/weak_ptr.h" |
24 #include "build/build_config.h" | 24 #include "build/build_config.h" |
25 #include "chrome/common/content_settings.h" | 25 #include "chrome/common/content_settings.h" |
26 #include "chrome/common/edit_command.h" | 26 #include "chrome/common/edit_command.h" |
27 #include "chrome/common/navigation_gesture.h" | 27 #include "chrome/common/navigation_gesture.h" |
28 #include "chrome/common/notification_type.h" | |
29 #include "chrome/common/page_zoom.h" | 28 #include "chrome/common/page_zoom.h" |
30 #include "chrome/common/render_messages.h" | 29 #include "chrome/common/render_messages.h" |
31 #include "chrome/common/renderer_preferences.h" | 30 #include "chrome/common/renderer_preferences.h" |
32 #include "chrome/common/translate_errors.h" | 31 #include "chrome/common/translate_errors.h" |
33 #include "chrome/common/view_types.h" | 32 #include "chrome/common/view_types.h" |
34 #include "chrome/renderer/automation/dom_automation_controller.h" | 33 #include "chrome/renderer/automation/dom_automation_controller.h" |
35 #include "chrome/renderer/dom_ui_bindings.h" | 34 #include "chrome/renderer/dom_ui_bindings.h" |
36 #include "chrome/renderer/extensions/extension_process_bindings.h" | 35 #include "chrome/renderer/extensions/extension_process_bindings.h" |
37 #include "chrome/renderer/external_host_bindings.h" | 36 #include "chrome/renderer/external_host_bindings.h" |
38 #include "chrome/renderer/form_manager.h" | 37 #include "chrome/renderer/form_manager.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 class AudioMessageFilter; | 74 class AudioMessageFilter; |
76 class DictionaryValue; | 75 class DictionaryValue; |
77 class DevToolsAgent; | 76 class DevToolsAgent; |
78 class DevToolsClient; | 77 class DevToolsClient; |
79 class FilePath; | 78 class FilePath; |
80 class GeolocationDispatcher; | 79 class GeolocationDispatcher; |
81 class GURL; | 80 class GURL; |
82 class ListValue; | 81 class ListValue; |
83 class NavigationState; | 82 class NavigationState; |
84 class PepperDeviceTest; | 83 class PepperDeviceTest; |
| 84 class PluginGroup; |
85 class PrintWebViewHelper; | 85 class PrintWebViewHelper; |
86 class SkBitmap; | 86 class SkBitmap; |
87 class WebPluginDelegatePepper; | 87 class WebPluginDelegatePepper; |
88 class WebPluginDelegateProxy; | 88 class WebPluginDelegateProxy; |
89 struct ContextMenuMediaParams; | 89 struct ContextMenuMediaParams; |
90 struct ThumbnailScore; | 90 struct ThumbnailScore; |
91 struct ViewMsg_ClosePage_Params; | 91 struct ViewMsg_ClosePage_Params; |
92 struct ViewMsg_Navigate_Params; | 92 struct ViewMsg_Navigate_Params; |
93 struct WebDropData; | 93 struct WebDropData; |
94 | 94 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // Notification that the default plugin has done something about a missing | 270 // Notification that the default plugin has done something about a missing |
271 // plugin. See default_plugin_shared.h for possible values of |status|. | 271 // plugin. See default_plugin_shared.h for possible values of |status|. |
272 void OnMissingPluginStatus(WebPluginDelegateProxy* delegate, | 272 void OnMissingPluginStatus(WebPluginDelegateProxy* delegate, |
273 int status); | 273 int status); |
274 | 274 |
275 // Notification that the given pepper plugin we created is being deleted the | 275 // Notification that the given pepper plugin we created is being deleted the |
276 // pointer must not be dereferenced as this is called from the destructor of | 276 // pointer must not be dereferenced as this is called from the destructor of |
277 // the plugin. | 277 // the plugin. |
278 void OnPepperPluginDestroy(WebPluginDelegatePepper* pepper_plugin); | 278 void OnPepperPluginDestroy(WebPluginDelegatePepper* pepper_plugin); |
279 | 279 |
280 // Create a new plugin without checking the content settings. | 280 // Create a new Pepper plugin without checking the content settings. |
281 WebKit::WebPlugin* CreatePluginInternal( | 281 WebKit::WebPlugin* CreatePepperPlugin(pepper::PluginModule* pepper_module, |
282 WebKit::WebFrame* frame, | 282 const WebKit::WebPluginParams& params); |
283 const WebKit::WebPluginParams& params); | 283 |
| 284 // Create a new NPAPI plugin without checking the content settings. |
| 285 WebKit::WebPlugin* CreateNPAPIPlugin(WebKit::WebFrame* frame, |
| 286 const WebKit::WebPluginParams& params, |
| 287 WebPluginInfo* plugin_info, |
| 288 const std::string& mime_type); |
284 | 289 |
285 // Asks the browser for the CPBrowsingContext associated with this renderer. | 290 // Asks the browser for the CPBrowsingContext associated with this renderer. |
286 // This is an opaque identifier associated with the renderer for sending | 291 // This is an opaque identifier associated with the renderer for sending |
287 // messages for the given "Chrome Plugin." The Chrome Plugin API is used | 292 // messages for the given "Chrome Plugin." The Chrome Plugin API is used |
288 // only by gears and this function can be deleted when we remove gears. | 293 // only by gears and this function can be deleted when we remove gears. |
289 uint32 GetCPBrowsingContext(); | 294 uint32 GetCPBrowsingContext(); |
290 | 295 |
291 #if defined(OS_MACOSX) | 296 #if defined(OS_MACOSX) |
292 // Helper routines for GPU plugin support. Used by the | 297 // Helper routines for GPU plugin support. Used by the |
293 // WebPluginDelegateProxy, which has a pointer to the RenderView. | 298 // WebPluginDelegateProxy, which has a pointer to the RenderView. |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); | 776 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); |
772 void OnGetApplicationInfo(int page_id); | 777 void OnGetApplicationInfo(int page_id); |
773 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( | 778 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( |
774 const std::vector<GURL>& links, | 779 const std::vector<GURL>& links, |
775 const std::vector<FilePath>& local_paths, | 780 const std::vector<FilePath>& local_paths, |
776 const FilePath& local_directory_name); | 781 const FilePath& local_directory_name); |
777 void OnHandleMessageFromExternalHost(const std::string& message, | 782 void OnHandleMessageFromExternalHost(const std::string& message, |
778 const std::string& origin, | 783 const std::string& origin, |
779 const std::string& target); | 784 const std::string& target); |
780 void OnInstallMissingPlugin(); | 785 void OnInstallMissingPlugin(); |
| 786 void OnLoadBlockedPlugins(); |
781 void OnMediaPlayerActionAt(const gfx::Point& location, | 787 void OnMediaPlayerActionAt(const gfx::Point& location, |
782 const WebKit::WebMediaPlayerAction& action); | 788 const WebKit::WebMediaPlayerAction& action); |
783 void OnMoveOrResizeStarted(); | 789 void OnMoveOrResizeStarted(); |
784 void OnNavigate(const ViewMsg_Navigate_Params& params); | 790 void OnNavigate(const ViewMsg_Navigate_Params& params); |
785 void OnNotifyRendererViewType(ViewType::Type view_type); | 791 void OnNotifyRendererViewType(ViewType::Type view_type); |
786 void OnFillPasswordForm( | 792 void OnFillPasswordForm( |
787 const webkit_glue::PasswordFormFillData& form_data); | 793 const webkit_glue::PasswordFormFillData& form_data); |
788 void OnPaste(); | 794 void OnPaste(); |
789 void OnPrintingDone(int document_cookie, bool success); | 795 void OnPrintingDone(int document_cookie, bool success); |
790 void OnPrintPages(); | 796 void OnPrintPages(); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 // Resets the |content_blocked_| array. | 863 // Resets the |content_blocked_| array. |
858 void ClearBlockedContentSettings(); | 864 void ClearBlockedContentSettings(); |
859 | 865 |
860 // Creates DevToolsClient and sets up JavaScript bindings for developer tools | 866 // Creates DevToolsClient and sets up JavaScript bindings for developer tools |
861 // UI that is going to be hosted by this RenderView. | 867 // UI that is going to be hosted by this RenderView. |
862 void CreateDevToolsClient(); | 868 void CreateDevToolsClient(); |
863 | 869 |
864 // Create a new placeholder for a blocked plugin. | 870 // Create a new placeholder for a blocked plugin. |
865 WebKit::WebPlugin* CreatePluginPlaceholder( | 871 WebKit::WebPlugin* CreatePluginPlaceholder( |
866 WebKit::WebFrame* frame, | 872 WebKit::WebFrame* frame, |
867 const WebKit::WebPluginParams& params); | 873 const WebKit::WebPluginParams& params, |
| 874 PluginGroup* group); |
868 | 875 |
869 // Sends an IPC notification that the specified content type was blocked. | 876 // Sends an IPC notification that the specified content type was blocked. |
870 void DidBlockContentType(ContentSettingsType settings_type); | 877 void DidBlockContentType(ContentSettingsType settings_type); |
871 | 878 |
872 // This callback is triggered when DownloadImage completes, either | 879 // This callback is triggered when DownloadImage completes, either |
873 // succesfully or with a failure. See DownloadImage for more details. | 880 // succesfully or with a failure. See DownloadImage for more details. |
874 void DidDownloadImage(webkit_glue::ImageResourceFetcher* fetcher, | 881 void DidDownloadImage(webkit_glue::ImageResourceFetcher* fetcher, |
875 const SkBitmap& image); | 882 const SkBitmap& image); |
876 | 883 |
877 // Requests to download an image. When done, the RenderView is | 884 // Requests to download an image. When done, the RenderView is |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1310 // ADDING NEW DATA? Please see if it fits appropriately in one of the above | 1317 // ADDING NEW DATA? Please see if it fits appropriately in one of the above |
1311 // sections rather than throwing it randomly at the end. If you're adding a | 1318 // sections rather than throwing it randomly at the end. If you're adding a |
1312 // bunch of stuff, you should probably create a helper class and put your | 1319 // bunch of stuff, you should probably create a helper class and put your |
1313 // data and methods on that to avoid bloating RenderView more. | 1320 // data and methods on that to avoid bloating RenderView more. |
1314 // --------------------------------------------------------------------------- | 1321 // --------------------------------------------------------------------------- |
1315 | 1322 |
1316 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1323 DISALLOW_COPY_AND_ASSIGN(RenderView); |
1317 }; | 1324 }; |
1318 | 1325 |
1319 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 1326 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |