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