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 #include "mandoline/ui/aura/window_tree_host_mojo.h" | 5 #include "mandoline/ui/aura/window_tree_host_mojo.h" |
6 | 6 |
7 #include "components/view_manager/public/cpp/view_manager.h" | 7 #include "components/view_manager/public/cpp/view_manager.h" |
8 #include "mandoline/ui/aura/surface_context_factory.h" | 8 #include "mandoline/ui/aura/surface_context_factory.h" |
9 #include "mojo/application/public/interfaces/shell.mojom.h" | 9 #include "mojo/application/public/interfaces/shell.mojom.h" |
10 #include "mojo/converters/geometry/geometry_type_converters.h" | 10 #include "mojo/converters/geometry/geometry_type_converters.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 void WindowTreeHostMojo::MoveCursorToNative(const gfx::Point& location) { | 86 void WindowTreeHostMojo::MoveCursorToNative(const gfx::Point& location) { |
87 NOTIMPLEMENTED(); | 87 NOTIMPLEMENTED(); |
88 } | 88 } |
89 | 89 |
90 void WindowTreeHostMojo::OnCursorVisibilityChangedNative(bool show) { | 90 void WindowTreeHostMojo::OnCursorVisibilityChangedNative(bool show) { |
91 NOTIMPLEMENTED(); | 91 NOTIMPLEMENTED(); |
92 } | 92 } |
93 | 93 |
94 //////////////////////////////////////////////////////////////////////////////// | 94 //////////////////////////////////////////////////////////////////////////////// |
95 // WindowTreeHostMojo, ui::EventSource implementation: | |
96 | |
97 ui::EventProcessor* WindowTreeHostMojo::GetEventProcessor() { | |
98 return dispatcher(); | |
99 } | |
100 | |
101 //////////////////////////////////////////////////////////////////////////////// | |
102 // WindowTreeHostMojo, ViewObserver implementation: | 95 // WindowTreeHostMojo, ViewObserver implementation: |
103 | 96 |
104 void WindowTreeHostMojo::OnViewBoundsChanged( | 97 void WindowTreeHostMojo::OnViewBoundsChanged( |
105 mojo::View* view, | 98 mojo::View* view, |
106 const mojo::Rect& old_bounds, | 99 const mojo::Rect& old_bounds, |
107 const mojo::Rect& new_bounds) { | 100 const mojo::Rect& new_bounds) { |
108 gfx::Rect old_bounds2 = old_bounds.To<gfx::Rect>(); | 101 gfx::Rect old_bounds2 = old_bounds.To<gfx::Rect>(); |
109 gfx::Rect new_bounds2 = new_bounds.To<gfx::Rect>(); | 102 gfx::Rect new_bounds2 = new_bounds.To<gfx::Rect>(); |
110 bounds_ = new_bounds2; | 103 bounds_ = new_bounds2; |
111 if (old_bounds2.origin() != new_bounds2.origin()) | 104 if (old_bounds2.origin() != new_bounds2.origin()) |
112 OnHostMoved(bounds_.origin()); | 105 OnHostMoved(bounds_.origin()); |
113 if (old_bounds2.size() != new_bounds2.size()) | 106 if (old_bounds2.size() != new_bounds2.size()) |
114 OnHostResized(bounds_.size()); | 107 OnHostResized(bounds_.size()); |
115 } | 108 } |
116 | 109 |
117 } // namespace mandoline | 110 } // namespace mandoline |
OLD | NEW |