| 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 MANDOLINE_UI_AURA_WINDOW_TREE_HOST_MOJO_H_ | 5 #ifndef MANDOLINE_UI_AURA_WINDOW_TREE_HOST_MOJO_H_ |
| 6 #define MANDOLINE_UI_AURA_WINDOW_TREE_HOST_MOJO_H_ | 6 #define MANDOLINE_UI_AURA_WINDOW_TREE_HOST_MOJO_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/view_manager/public/cpp/view_observer.h" | 9 #include "components/view_manager/public/cpp/view_observer.h" |
| 10 #include "ui/aura/window_tree_host.h" | 10 #include "ui/aura/window_tree_host.h" |
| 11 #include "ui/events/event_source.h" | 11 #include "ui/events/event_source.h" |
| 12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
| 13 | 13 |
| 14 class SkBitmap; | 14 class SkBitmap; |
| 15 | 15 |
| 16 namespace ui { | 16 namespace ui { |
| 17 class Compositor; | 17 class Compositor; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace mojo { | 20 namespace mojo { |
| 21 class Shell; | 21 class Shell; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace mandoline { | 24 namespace mandoline { |
| 25 | 25 |
| 26 class InputMethodMandoline; |
| 26 class SurfaceContextFactory; | 27 class SurfaceContextFactory; |
| 27 | 28 |
| 28 class WindowTreeHostMojo : public aura::WindowTreeHost, | 29 class WindowTreeHostMojo : public aura::WindowTreeHost, |
| 29 public mojo::ViewObserver { | 30 public mojo::ViewObserver { |
| 30 public: | 31 public: |
| 31 WindowTreeHostMojo(mojo::Shell* shell, mojo::View* view); | 32 WindowTreeHostMojo(mojo::Shell* shell, mojo::View* view); |
| 32 ~WindowTreeHostMojo() override; | 33 ~WindowTreeHostMojo() override; |
| 33 | 34 |
| 34 const gfx::Rect& bounds() const { return bounds_; } | 35 const gfx::Rect& bounds() const { return bounds_; } |
| 35 | 36 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 54 | 55 |
| 55 // mojo::ViewObserver: | 56 // mojo::ViewObserver: |
| 56 void OnViewBoundsChanged(mojo::View* view, | 57 void OnViewBoundsChanged(mojo::View* view, |
| 57 const mojo::Rect& old_bounds, | 58 const mojo::Rect& old_bounds, |
| 58 const mojo::Rect& new_bounds) override; | 59 const mojo::Rect& new_bounds) override; |
| 59 | 60 |
| 60 mojo::View* view_; | 61 mojo::View* view_; |
| 61 | 62 |
| 62 gfx::Rect bounds_; | 63 gfx::Rect bounds_; |
| 63 | 64 |
| 65 scoped_ptr<InputMethodMandoline> input_method_; |
| 66 |
| 64 scoped_ptr<SurfaceContextFactory> context_factory_; | 67 scoped_ptr<SurfaceContextFactory> context_factory_; |
| 65 | 68 |
| 66 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMojo); | 69 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMojo); |
| 67 }; | 70 }; |
| 68 | 71 |
| 69 } // namespace mandoline | 72 } // namespace mandoline |
| 70 | 73 |
| 71 #endif // MANDOLINE_UI_AURA_WINDOW_TREE_HOST_MOJO_H_ | 74 #endif // MANDOLINE_UI_AURA_WINDOW_TREE_HOST_MOJO_H_ |
| OLD | NEW |