| 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 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 #if defined(COMPILER_MSVC) | 69 #if defined(COMPILER_MSVC) |
| 70 // RenderViewImpl is a diamond-shaped hierarchy, with WebWidgetClient at the | 70 // RenderViewImpl is a diamond-shaped hierarchy, with WebWidgetClient at the |
| 71 // root. VS warns when we inherit the WebWidgetClient method implementations | 71 // root. VS warns when we inherit the WebWidgetClient method implementations |
| 72 // from RenderWidget. It's safe to ignore that warning. | 72 // from RenderWidget. It's safe to ignore that warning. |
| 73 #pragma warning(disable: 4250) | 73 #pragma warning(disable: 4250) |
| 74 #endif | 74 #endif |
| 75 | 75 |
| 76 class SkBitmap; | 76 class SkBitmap; |
| 77 struct PP_NetAddress_Private; | 77 struct PP_NetAddress_Private; |
| 78 struct ViewMsg_New_Params; | |
| 79 struct ViewMsg_StopFinding_Params; | 78 struct ViewMsg_StopFinding_Params; |
| 80 | 79 |
| 81 namespace base { | 80 namespace base { |
| 82 class CommandLine; | 81 class CommandLine; |
| 83 } | 82 } |
| 84 | 83 |
| 85 namespace blink { | 84 namespace blink { |
| 86 class WebApplicationCacheHost; | 85 class WebApplicationCacheHost; |
| 87 class WebApplicationCacheHostClient; | 86 class WebApplicationCacheHostClient; |
| 88 class WebDOMMessageEvent; | 87 class WebDOMMessageEvent; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 class RendererDateTimePicker; | 124 class RendererDateTimePicker; |
| 126 class RendererWebColorChooserImpl; | 125 class RendererWebColorChooserImpl; |
| 127 class SpeechRecognitionDispatcher; | 126 class SpeechRecognitionDispatcher; |
| 128 class WebPluginDelegateProxy; | 127 class WebPluginDelegateProxy; |
| 129 struct FaviconURL; | 128 struct FaviconURL; |
| 130 struct FileChooserParams; | 129 struct FileChooserParams; |
| 131 struct FileChooserFileInfo; | 130 struct FileChooserFileInfo; |
| 132 struct RenderViewImplParams; | 131 struct RenderViewImplParams; |
| 133 struct ResizeParams; | 132 struct ResizeParams; |
| 134 | 133 |
| 134 namespace mojom { |
| 135 class CreateViewParams; |
| 136 } |
| 137 |
| 135 #if defined(OS_ANDROID) | 138 #if defined(OS_ANDROID) |
| 136 class WebMediaPlayerProxyAndroid; | 139 class WebMediaPlayerProxyAndroid; |
| 137 #endif | 140 #endif |
| 138 | 141 |
| 139 // | 142 // |
| 140 // RenderView is an object that manages a WebView object, and provides a | 143 // RenderView is an object that manages a WebView object, and provides a |
| 141 // communication interface with an embedding application process. | 144 // communication interface with an embedding application process. |
| 142 // | 145 // |
| 143 // DEPRECATED: RenderViewImpl is being removed as part of the SiteIsolation | 146 // DEPRECATED: RenderViewImpl is being removed as part of the SiteIsolation |
| 144 // project. New code should be added to RenderFrameImpl instead. | 147 // project. New code should be added to RenderFrameImpl instead. |
| 145 // | 148 // |
| 146 // For context, please see https://crbug.com/467770 and | 149 // For context, please see https://crbug.com/467770 and |
| 147 // http://www.chromium.org/developers/design-documents/site-isolation. | 150 // http://www.chromium.org/developers/design-documents/site-isolation. |
| 148 class CONTENT_EXPORT RenderViewImpl | 151 class CONTENT_EXPORT RenderViewImpl |
| 149 : public RenderWidget, | 152 : public RenderWidget, |
| 150 NON_EXPORTED_BASE(public blink::WebViewClient), | 153 NON_EXPORTED_BASE(public blink::WebViewClient), |
| 151 public RenderWidgetOwnerDelegate, | 154 public RenderWidgetOwnerDelegate, |
| 152 public RenderView, | 155 public RenderView, |
| 153 public base::SupportsWeakPtr<RenderViewImpl> { | 156 public base::SupportsWeakPtr<RenderViewImpl> { |
| 154 public: | 157 public: |
| 155 // Creates a new RenderView. |opener_id| is the routing ID of the RenderView | 158 // Creates a new RenderView. |opener_id| is the routing ID of the RenderView |
| 156 // responsible for creating this RenderView. Note that if the original opener | 159 // responsible for creating this RenderView. Note that if the original opener |
| 157 // has been closed, |window_was_created_with_opener| will be true and | 160 // has been closed, |window_was_created_with_opener| will be true and |
| 158 // |opener_id| will be MSG_ROUTING_NONE. When |swapped_out| is true, the | 161 // |opener_id| will be MSG_ROUTING_NONE. When |swapped_out| is true, the |
| 159 // |proxy_routing_id| is specified, so a RenderFrameProxy can be created for | 162 // |proxy_routing_id| is specified, so a RenderFrameProxy can be created for |
| 160 // this RenderView's main RenderFrame. | 163 // this RenderView's main RenderFrame. |
| 161 static RenderViewImpl* Create(CompositorDependencies* compositor_deps, | 164 static RenderViewImpl* Create(CompositorDependencies* compositor_deps, |
| 162 const ViewMsg_New_Params& params, | 165 const mojom::CreateViewParams& params, |
| 163 bool was_created_by_renderer); | 166 bool was_created_by_renderer); |
| 164 | 167 |
| 165 // Used by content_layouttest_support to hook into the creation of | 168 // Used by content_layouttest_support to hook into the creation of |
| 166 // RenderViewImpls. | 169 // RenderViewImpls. |
| 167 static void InstallCreateHook(RenderViewImpl* (*create_render_view_impl)( | 170 static void InstallCreateHook(RenderViewImpl* (*create_render_view_impl)( |
| 168 CompositorDependencies* compositor_deps, | 171 CompositorDependencies* compositor_deps, |
| 169 const ViewMsg_New_Params&)); | 172 const mojom::CreateViewParams&)); |
| 170 | 173 |
| 171 // Returns the RenderViewImpl containing the given WebView. | 174 // Returns the RenderViewImpl containing the given WebView. |
| 172 static RenderViewImpl* FromWebView(blink::WebView* webview); | 175 static RenderViewImpl* FromWebView(blink::WebView* webview); |
| 173 | 176 |
| 174 // Returns the RenderViewImpl for the given routing ID. | 177 // Returns the RenderViewImpl for the given routing ID. |
| 175 static RenderViewImpl* FromRoutingID(int routing_id); | 178 static RenderViewImpl* FromRoutingID(int routing_id); |
| 176 | 179 |
| 177 // May return NULL when the view is closing. | 180 // May return NULL when the view is closing. |
| 178 blink::WebView* webview() const; | 181 blink::WebView* webview() const; |
| 179 | 182 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 void OnResize(const ResizeParams& params) override; | 430 void OnResize(const ResizeParams& params) override; |
| 428 void OnSetFocus(bool enable) override; | 431 void OnSetFocus(bool enable) override; |
| 429 GURL GetURLForGraphicsContext3D() override; | 432 GURL GetURLForGraphicsContext3D() override; |
| 430 void OnOrientationChange() override; | 433 void OnOrientationChange() override; |
| 431 void DidCommitCompositorFrame() override; | 434 void DidCommitCompositorFrame() override; |
| 432 void DidCompletePageScaleAnimation() override; | 435 void DidCompletePageScaleAnimation() override; |
| 433 void OnDeviceScaleFactorChanged() override; | 436 void OnDeviceScaleFactorChanged() override; |
| 434 void ResizeWebWidget() override; | 437 void ResizeWebWidget() override; |
| 435 | 438 |
| 436 RenderViewImpl(CompositorDependencies* compositor_deps, | 439 RenderViewImpl(CompositorDependencies* compositor_deps, |
| 437 const ViewMsg_New_Params& params); | 440 const mojom::CreateViewParams& params); |
| 438 | 441 |
| 439 void Initialize(const ViewMsg_New_Params& params, | 442 void Initialize(const mojom::CreateViewParams& params, |
| 440 bool was_created_by_renderer); | 443 bool was_created_by_renderer); |
| 441 void SetScreenMetricsEmulationParameters( | 444 void SetScreenMetricsEmulationParameters( |
| 442 bool enabled, | 445 bool enabled, |
| 443 const blink::WebDeviceEmulationParams& params) override; | 446 const blink::WebDeviceEmulationParams& params) override; |
| 444 | 447 |
| 445 // Do not delete directly. This class is reference counted. | 448 // Do not delete directly. This class is reference counted. |
| 446 ~RenderViewImpl() override; | 449 ~RenderViewImpl() override; |
| 447 | 450 |
| 448 private: | 451 private: |
| 449 // For unit tests. | 452 // For unit tests. |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 // use the Observer interface to filter IPC messages and receive frame change | 908 // use the Observer interface to filter IPC messages and receive frame change |
| 906 // notifications. | 909 // notifications. |
| 907 // --------------------------------------------------------------------------- | 910 // --------------------------------------------------------------------------- |
| 908 | 911 |
| 909 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 912 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 910 }; | 913 }; |
| 911 | 914 |
| 912 } // namespace content | 915 } // namespace content |
| 913 | 916 |
| 914 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 917 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |