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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "chrome/renderer/searchbox.h" | 36 #include "chrome/renderer/searchbox.h" |
37 #include "chrome/renderer/translate_helper.h" | 37 #include "chrome/renderer/translate_helper.h" |
38 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" | 38 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
39 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h" | 39 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h" |
40 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" | 40 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" |
41 #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerAction.h" | 41 #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerAction.h" |
42 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializerClient.h" | 42 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializerClient.h" |
43 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 43 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
44 #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" | 44 #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" |
45 #include "third_party/WebKit/WebKit/chromium/public/WebNavigationType.h" | 45 #include "third_party/WebKit/WebKit/chromium/public/WebNavigationType.h" |
| 46 #include "webkit/glue/plugins/webplugin_page_delegate.h" |
46 #include "webkit/glue/webpreferences.h" | 47 #include "webkit/glue/webpreferences.h" |
47 #include "webkit/plugins/npapi/webplugin_page_delegate.h" | |
48 | 48 |
49 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
50 // RenderView is a diamond-shaped hierarchy, with WebWidgetClient at the root. | 50 // RenderView is a diamond-shaped hierarchy, with WebWidgetClient at the root. |
51 // VS warns when we inherit the WebWidgetClient method implementations from | 51 // VS warns when we inherit the WebWidgetClient method implementations from |
52 // RenderWidget. It's safe to ignore that warning. | 52 // RenderWidget. It's safe to ignore that warning. |
53 #pragma warning(disable: 4250) | 53 #pragma warning(disable: 4250) |
54 #endif | 54 #endif |
55 | 55 |
56 class AudioMessageFilter; | 56 class AudioMessageFilter; |
57 class AutoFillHelper; | 57 class AutoFillHelper; |
58 class CustomMenuListener; | 58 class CustomMenuListener; |
59 class DictionaryValue; | 59 class DictionaryValue; |
60 class DeviceOrientationDispatcher; | 60 class DeviceOrientationDispatcher; |
61 class DevToolsAgent; | 61 class DevToolsAgent; |
62 class DevToolsClient; | 62 class DevToolsClient; |
63 class DomAutomationController; | 63 class DomAutomationController; |
64 class DOMUIBindings; | 64 class DOMUIBindings; |
65 class ExternalHostBindings; | 65 class ExternalHostBindings; |
66 class FilePath; | 66 class FilePath; |
67 class GeolocationDispatcher; | 67 class GeolocationDispatcher; |
68 class GeolocationDispatcherOld; | 68 class GeolocationDispatcherOld; |
69 class GURL; | 69 class GURL; |
70 class ListValue; | 70 class ListValue; |
71 class LoadProgressTracker; | 71 class LoadProgressTracker; |
72 class NavigationState; | 72 class NavigationState; |
73 class NotificationProvider; | 73 class NotificationProvider; |
74 class PageClickTracker; | 74 class PageClickTracker; |
75 class PasswordAutocompleteManager; | 75 class PasswordAutocompleteManager; |
76 class PepperDeviceTest; | 76 class PepperDeviceTest; |
| 77 class PluginGroup; |
77 class PrintWebViewHelper; | 78 class PrintWebViewHelper; |
78 class RenderViewVisitor; | 79 class RenderViewVisitor; |
79 class SkBitmap; | 80 class SkBitmap; |
80 class SpeechInputDispatcher; | 81 class SpeechInputDispatcher; |
81 class WebPluginDelegatePepper; | 82 class WebPluginDelegatePepper; |
82 class WebPluginDelegateProxy; | 83 class WebPluginDelegateProxy; |
83 struct ContextMenuMediaParams; | 84 struct ContextMenuMediaParams; |
84 struct ThumbnailScore; | 85 struct ThumbnailScore; |
85 struct ViewMsg_ClosePage_Params; | 86 struct ViewMsg_ClosePage_Params; |
86 struct ViewMsg_Navigate_Params; | 87 struct ViewMsg_Navigate_Params; |
87 struct WebDropData; | 88 struct WebDropData; |
88 | 89 |
89 namespace base { | 90 namespace base { |
90 class WaitableEvent; | 91 class WaitableEvent; |
91 } | 92 } |
92 | 93 |
93 namespace gfx { | 94 namespace gfx { |
94 class Point; | 95 class Point; |
95 class Rect; | 96 class Rect; |
96 } | 97 } |
97 | 98 |
98 namespace webkit { | 99 namespace webkit { |
| 100 namespace ppapi { |
99 | 101 |
100 namespace npapi { | |
101 class PluginGroup; | |
102 } // namespace npapi | |
103 | |
104 namespace ppapi { | |
105 class PluginInstance; | 102 class PluginInstance; |
106 class FullscreenContainer; | 103 class FullscreenContainer; |
| 104 |
107 } // namespace ppapi | 105 } // namespace ppapi |
108 | |
109 } // namespace webkit | 106 } // namespace webkit |
110 | 107 |
111 namespace safe_browsing { | 108 namespace safe_browsing { |
112 class PhishingClassifierDelegate; | 109 class PhishingClassifierDelegate; |
113 } | 110 } |
114 | 111 |
115 namespace webkit_glue { | 112 namespace webkit_glue { |
116 class ImageResourceFetcher; | 113 class ImageResourceFetcher; |
117 struct FileUploadData; | 114 struct FileUploadData; |
118 struct FormData; | 115 struct FormData; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 typedef base::RefCountedData<int> SharedRenderViewCounter; | 164 typedef base::RefCountedData<int> SharedRenderViewCounter; |
168 | 165 |
169 // | 166 // |
170 // RenderView is an object that manages a WebView object, and provides a | 167 // RenderView is an object that manages a WebView object, and provides a |
171 // communication interface with an embedding application process | 168 // communication interface with an embedding application process |
172 // | 169 // |
173 class RenderView : public RenderWidget, | 170 class RenderView : public RenderWidget, |
174 public WebKit::WebViewClient, | 171 public WebKit::WebViewClient, |
175 public WebKit::WebFrameClient, | 172 public WebKit::WebFrameClient, |
176 public WebKit::WebPageSerializerClient, | 173 public WebKit::WebPageSerializerClient, |
177 public webkit::npapi::WebPluginPageDelegate, | 174 public webkit_glue::WebPluginPageDelegate, |
178 public base::SupportsWeakPtr<RenderView> { | 175 public base::SupportsWeakPtr<RenderView> { |
179 public: | 176 public: |
180 // Creates a new RenderView. The parent_hwnd specifies a HWND to use as the | 177 // Creates a new RenderView. The parent_hwnd specifies a HWND to use as the |
181 // parent of the WebView HWND that will be created. If this is a constrained | 178 // parent of the WebView HWND that will be created. If this is a constrained |
182 // popup or as a new tab, opener_id is the routing ID of the RenderView | 179 // popup or as a new tab, opener_id is the routing ID of the RenderView |
183 // responsible for creating this RenderView (corresponding to parent_hwnd). | 180 // responsible for creating this RenderView (corresponding to parent_hwnd). |
184 // |counter| is either a currently initialized counter, or NULL (in which case | 181 // |counter| is either a currently initialized counter, or NULL (in which case |
185 // we treat this RenderView as a top level window). | 182 // we treat this RenderView as a top level window). |
186 static RenderView* Create( | 183 static RenderView* Create( |
187 RenderThreadBase* render_thread, | 184 RenderThreadBase* render_thread, |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 WebKit::WebFileSystemCallbacks* callbacks); | 643 WebKit::WebFileSystemCallbacks* callbacks); |
647 | 644 |
648 // WebKit::WebPageSerializerClient implementation ---------------------------- | 645 // WebKit::WebPageSerializerClient implementation ---------------------------- |
649 | 646 |
650 virtual void didSerializeDataForFrame(const WebKit::WebURL& frame_url, | 647 virtual void didSerializeDataForFrame(const WebKit::WebURL& frame_url, |
651 const WebKit::WebCString& data, | 648 const WebKit::WebCString& data, |
652 PageSerializationStatus status); | 649 PageSerializationStatus status); |
653 | 650 |
654 // webkit_glue::WebPluginPageDelegate implementation ------------------------- | 651 // webkit_glue::WebPluginPageDelegate implementation ------------------------- |
655 | 652 |
656 virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate( | 653 virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate( |
657 const FilePath& file_path, | 654 const FilePath& file_path, |
658 const std::string& mime_type); | 655 const std::string& mime_type); |
659 virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle); | 656 virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle); |
660 virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle); | 657 virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle); |
661 virtual void DidMovePlugin(const webkit::npapi::WebPluginGeometry& move); | 658 virtual void DidMovePlugin(const webkit_glue::WebPluginGeometry& move); |
662 virtual void DidStartLoadingForPlugin(); | 659 virtual void DidStartLoadingForPlugin(); |
663 virtual void DidStopLoadingForPlugin(); | 660 virtual void DidStopLoadingForPlugin(); |
664 virtual void ShowModalHTMLDialogForPlugin( | 661 virtual void ShowModalHTMLDialogForPlugin( |
665 const GURL& url, | 662 const GURL& url, |
666 const gfx::Size& size, | 663 const gfx::Size& size, |
667 const std::string& json_arguments, | 664 const std::string& json_arguments, |
668 std::string* json_retval); | 665 std::string* json_retval); |
669 virtual WebKit::WebCookieJar* GetCookieJar(); | 666 virtual WebKit::WebCookieJar* GetCookieJar(); |
670 | 667 |
671 // Please do not add your stuff randomly to the end here. If there is an | 668 // Please do not add your stuff randomly to the end here. If there is an |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 // Create a new Pepper plugin. | 1019 // Create a new Pepper plugin. |
1023 WebKit::WebPlugin* CreatePepperPlugin( | 1020 WebKit::WebPlugin* CreatePepperPlugin( |
1024 WebKit::WebFrame* frame, | 1021 WebKit::WebFrame* frame, |
1025 const WebKit::WebPluginParams& params, | 1022 const WebKit::WebPluginParams& params, |
1026 const FilePath& path, | 1023 const FilePath& path, |
1027 webkit::ppapi::PluginModule* pepper_module); | 1024 webkit::ppapi::PluginModule* pepper_module); |
1028 | 1025 |
1029 WebKit::WebPlugin* CreatePluginPlaceholder( | 1026 WebKit::WebPlugin* CreatePluginPlaceholder( |
1030 WebKit::WebFrame* frame, | 1027 WebKit::WebFrame* frame, |
1031 const WebKit::WebPluginParams& params, | 1028 const WebKit::WebPluginParams& params, |
1032 const webkit::npapi::PluginGroup& group, | 1029 const PluginGroup& group, |
1033 int resource_id, | 1030 int resource_id, |
1034 int message_id); | 1031 int message_id); |
1035 | 1032 |
1036 // Sends an IPC notification that the specified content type was blocked. | 1033 // Sends an IPC notification that the specified content type was blocked. |
1037 // If the content type requires it, |resource_identifier| names the specific | 1034 // If the content type requires it, |resource_identifier| names the specific |
1038 // resource that was blocked (the plugin path in the case of plugins), | 1035 // resource that was blocked (the plugin path in the case of plugins), |
1039 // otherwise it's the empty string. | 1036 // otherwise it's the empty string. |
1040 void DidBlockContentType(ContentSettingsType settings_type, | 1037 void DidBlockContentType(ContentSettingsType settings_type, |
1041 const std::string& resource_identifier); | 1038 const std::string& resource_identifier); |
1042 | 1039 |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 // Track the fake plugin window handles allocated on the browser side for | 1332 // Track the fake plugin window handles allocated on the browser side for |
1336 // the accelerated compositor and (currently) accelerated plugins so that | 1333 // the accelerated compositor and (currently) accelerated plugins so that |
1337 // we can discard them when the view goes away. | 1334 // we can discard them when the view goes away. |
1338 std::set<gfx::PluginWindowHandle> fake_plugin_window_handles_; | 1335 std::set<gfx::PluginWindowHandle> fake_plugin_window_handles_; |
1339 #endif | 1336 #endif |
1340 | 1337 |
1341 // Plugins ------------------------------------------------------------------- | 1338 // Plugins ------------------------------------------------------------------- |
1342 | 1339 |
1343 // Remember the first uninstalled plugin, so that we can ask the plugin | 1340 // Remember the first uninstalled plugin, so that we can ask the plugin |
1344 // to install itself when user clicks on the info bar. | 1341 // to install itself when user clicks on the info bar. |
1345 base::WeakPtr<webkit::npapi::WebPluginDelegate> first_default_plugin_; | 1342 base::WeakPtr<webkit_glue::WebPluginDelegate> first_default_plugin_; |
1346 | 1343 |
1347 PepperPluginDelegateImpl pepper_delegate_; | 1344 PepperPluginDelegateImpl pepper_delegate_; |
1348 | 1345 |
1349 // All the currently active plugin delegates for this RenderView; kept so that | 1346 // All the currently active plugin delegates for this RenderView; kept so that |
1350 // we can enumerate them to send updates about things like window location | 1347 // we can enumerate them to send updates about things like window location |
1351 // or tab focus and visibily. These are non-owning references. | 1348 // or tab focus and visibily. These are non-owning references. |
1352 std::set<WebPluginDelegateProxy*> plugin_delegates_; | 1349 std::set<WebPluginDelegateProxy*> plugin_delegates_; |
1353 | 1350 |
1354 // A list of all Pepper v1 plugins that we've created that haven't been | 1351 // A list of all Pepper v1 plugins that we've created that haven't been |
1355 // destroyed yet. Pepper v2 plugins are tracked by the pepper_delegate_. | 1352 // destroyed yet. Pepper v2 plugins are tracked by the pepper_delegate_. |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1509 // ADDING NEW DATA? Please see if it fits appropriately in one of the above | 1506 // ADDING NEW DATA? Please see if it fits appropriately in one of the above |
1510 // sections rather than throwing it randomly at the end. If you're adding a | 1507 // sections rather than throwing it randomly at the end. If you're adding a |
1511 // bunch of stuff, you should probably create a helper class and put your | 1508 // bunch of stuff, you should probably create a helper class and put your |
1512 // data and methods on that to avoid bloating RenderView more. | 1509 // data and methods on that to avoid bloating RenderView more. |
1513 // --------------------------------------------------------------------------- | 1510 // --------------------------------------------------------------------------- |
1514 | 1511 |
1515 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1512 DISALLOW_COPY_AND_ASSIGN(RenderView); |
1516 }; | 1513 }; |
1517 | 1514 |
1518 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 1515 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |