| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/mus/public/cpp/scoped_window_ptr.h" |
| 10 #include "components/mus/public/cpp/window.h" |
| 9 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 11 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 12 #include "content/public/browser/render_process_host_observer.h" |
| 10 | 13 |
| 11 namespace content { | 14 namespace content { |
| 12 | 15 |
| 13 class RenderWidgetHost; | 16 class RenderWidgetHost; |
| 14 class RenderWidgetHostImpl; | 17 class RenderWidgetHostImpl; |
| 15 struct NativeWebKeyboardEvent; | 18 struct NativeWebKeyboardEvent; |
| 16 | 19 |
| 17 // See comments in render_widget_host_view.h about this class and its members. | 20 // See comments in render_widget_host_view.h about this class and its members. |
| 18 // This version of RenderWidgetHostView is for builds of Chrome that run through | 21 // This version of RenderWidgetHostView is for builds of Chrome that run through |
| 19 // the mojo shell and use the Mandoline UI Service (Mus). Mus is responsible for | 22 // the mojo shell and use the Mandoline UI Service (Mus). Mus is responsible for |
| 20 // windowing, compositing, and input event dispatch. The purpose of | 23 // windowing, compositing, and input event dispatch. The purpose of |
| 21 // RenderWidgetHostViewMus is to manage the mus::Window owned by the content | 24 // RenderWidgetHostViewMus is to manage the mus::Window owned by the content |
| 22 // embedder. The browser is the owner of the mus::Window, controlling properties | 25 // embedder. The browser is the owner of the mus::Window, controlling properties |
| 23 // such as visibility, and bounds. Some aspects such as input, focus, and cursor | 26 // such as visibility, and bounds. Some aspects such as input, focus, and cursor |
| 24 // are managed by Mus directly. Input event routing will be plumbed directly to | 27 // are managed by Mus directly. Input event routing will be plumbed directly to |
| 25 // the renderer from Mus. | 28 // the renderer from Mus. |
| 26 class CONTENT_EXPORT RenderWidgetHostViewMus : public RenderWidgetHostViewBase { | 29 class CONTENT_EXPORT RenderWidgetHostViewMus : public RenderWidgetHostViewBase { |
| 27 public: | 30 public: |
| 28 RenderWidgetHostViewMus( | 31 RenderWidgetHostViewMus( |
| 32 mus::Window* parent_window, |
| 29 RenderWidgetHostImpl* widget, | 33 RenderWidgetHostImpl* widget, |
| 30 base::WeakPtr<RenderWidgetHostViewBase> platform_view); | 34 base::WeakPtr<RenderWidgetHostViewBase> platform_view); |
| 31 ~RenderWidgetHostViewMus() override; | 35 ~RenderWidgetHostViewMus() override; |
| 32 | 36 |
| 33 private: | 37 private: |
| 38 void EmbedClient(); |
| 39 |
| 34 // RenderWidgetHostView implementation. | 40 // RenderWidgetHostView implementation. |
| 35 void InitAsChild(gfx::NativeView parent_view) override; | 41 void InitAsChild(gfx::NativeView parent_view) override; |
| 36 RenderWidgetHost* GetRenderWidgetHost() const override; | 42 RenderWidgetHost* GetRenderWidgetHost() const override; |
| 37 void SetSize(const gfx::Size& size) override; | 43 void SetSize(const gfx::Size& size) override; |
| 38 void SetBounds(const gfx::Rect& rect) override; | 44 void SetBounds(const gfx::Rect& rect) override; |
| 39 void Focus() override; | 45 void Focus() override; |
| 40 bool HasFocus() const override; | 46 bool HasFocus() const override; |
| 41 bool IsSurfaceAvailableForCopy() const override; | 47 bool IsSurfaceAvailableForCopy() const override; |
| 42 void Show() override; | 48 void Show() override; |
| 43 void Hide() override; | 49 void Hide() override; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 void LockCompositingSurface() override; | 118 void LockCompositingSurface() override; |
| 113 void UnlockCompositingSurface() override; | 119 void UnlockCompositingSurface() override; |
| 114 | 120 |
| 115 #if defined(OS_WIN) | 121 #if defined(OS_WIN) |
| 116 void SetParentNativeViewAccessible( | 122 void SetParentNativeViewAccessible( |
| 117 gfx::NativeViewAccessible accessible_parent) override; | 123 gfx::NativeViewAccessible accessible_parent) override; |
| 118 gfx::NativeViewId GetParentForWindowlessPlugin() const override; | 124 gfx::NativeViewId GetParentForWindowlessPlugin() const override; |
| 119 #endif | 125 #endif |
| 120 | 126 |
| 121 RenderWidgetHostImpl* host_; | 127 RenderWidgetHostImpl* host_; |
| 128 scoped_ptr<mus::ScopedWindowPtr> window_; |
| 122 gfx::Size size_; | 129 gfx::Size size_; |
| 123 // The platform view for this RenderWidgetHostView. | 130 // The platform view for this RenderWidgetHostView. |
| 124 // RenderWidgetHostViewMus mostly only cares about stuff related to | 131 // RenderWidgetHostViewMus mostly only cares about stuff related to |
| 125 // compositing, the rest are directly forwared to this |platform_view_|. | 132 // compositing, the rest are directly forwared to this |platform_view_|. |
| 126 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; | 133 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; |
| 127 | 134 |
| 128 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMus); | 135 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMus); |
| 129 }; | 136 }; |
| 130 | 137 |
| 131 } // namespace content | 138 } // namespace content |
| 132 | 139 |
| 133 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ | 140 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ |
| OLD | NEW |