| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" |
| 11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 12 #include "components/mus/public/cpp/input_event_handler.h" | 13 #include "components/mus/public/cpp/input_event_handler.h" |
| 13 #include "components/mus/public/cpp/scoped_window_ptr.h" | 14 #include "components/mus/public/cpp/scoped_window_ptr.h" |
| 14 #include "components/mus/public/cpp/window.h" | 15 #include "components/mus/public/cpp/window.h" |
| 15 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 16 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 16 #include "content/public/browser/render_process_host_observer.h" | 17 #include "content/public/browser/render_process_host_observer.h" |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 | 20 |
| 20 class RenderWidgetHost; | 21 class RenderWidgetHost; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 38 RenderWidgetHostViewMus(mus::Window* parent_window, | 39 RenderWidgetHostViewMus(mus::Window* parent_window, |
| 39 RenderWidgetHostImpl* widget); | 40 RenderWidgetHostImpl* widget); |
| 40 ~RenderWidgetHostViewMus() override; | 41 ~RenderWidgetHostViewMus() override; |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 // Set the bounds of the window and handle size changes. Assumes the caller | 44 // Set the bounds of the window and handle size changes. Assumes the caller |
| 44 // has already adjusted the origin of |rect| to conform to whatever coordinate | 45 // has already adjusted the origin of |rect| to conform to whatever coordinate |
| 45 // space is required by the aura::Window. | 46 // space is required by the aura::Window. |
| 46 void InternalSetBounds(const gfx::Rect& rect); | 47 void InternalSetBounds(const gfx::Rect& rect); |
| 47 | 48 |
| 49 void OnEmbed(bool success, |
| 50 mus::mojom::InputEventHandlerPtr event_handler); |
| 51 |
| 48 // RenderWidgetHostView implementation. | 52 // RenderWidgetHostView implementation. |
| 49 void InitAsChild(gfx::NativeView parent_view) override; | 53 void InitAsChild(gfx::NativeView parent_view) override; |
| 50 RenderWidgetHost* GetRenderWidgetHost() const override; | 54 RenderWidgetHost* GetRenderWidgetHost() const override; |
| 51 void SetSize(const gfx::Size& size) override; | 55 void SetSize(const gfx::Size& size) override; |
| 52 void SetBounds(const gfx::Rect& rect) override; | 56 void SetBounds(const gfx::Rect& rect) override; |
| 53 void Focus() override; | 57 void Focus() override; |
| 54 bool HasFocus() const override; | 58 bool HasFocus() const override; |
| 55 bool IsSurfaceAvailableForCopy() const override; | 59 bool IsSurfaceAvailableForCopy() const override; |
| 56 void Show() override; | 60 void Show() override; |
| 57 void Hide() override; | 61 void Hide() override; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 mus::Window* target, | 127 mus::Window* target, |
| 124 const ui::Event& event, | 128 const ui::Event& event, |
| 125 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>* | 129 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>* |
| 126 ack_callback) override; | 130 ack_callback) override; |
| 127 | 131 |
| 128 RenderWidgetHostImpl* host_; | 132 RenderWidgetHostImpl* host_; |
| 129 | 133 |
| 130 aura::Window* aura_window_; | 134 aura::Window* aura_window_; |
| 131 | 135 |
| 132 std::unique_ptr<mus::ScopedWindowPtr> mus_window_; | 136 std::unique_ptr<mus::ScopedWindowPtr> mus_window_; |
| 137 mus::mojom::InputEventHandlerPtr event_handler_; |
| 133 | 138 |
| 139 base::WeakPtrFactory<RenderWidgetHostViewMus> weak_factory_; |
| 134 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMus); | 140 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMus); |
| 135 }; | 141 }; |
| 136 | 142 |
| 137 } // namespace content | 143 } // namespace content |
| 138 | 144 |
| 139 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ | 145 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ |
| OLD | NEW |