OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/aura/window_tree_host_mojo.h" | 5 #include "mojo/aura/window_tree_host_mojo.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "mojo/aura/window_tree_host_mojo_delegate.h" | 9 #include "mojo/aura/window_tree_host_mojo_delegate.h" |
10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 //////////////////////////////////////////////////////////////////////////////// | 157 //////////////////////////////////////////////////////////////////////////////// |
158 // WindowTreeHostMojo, ui::EventSource implementation: | 158 // WindowTreeHostMojo, ui::EventSource implementation: |
159 | 159 |
160 ui::EventProcessor* WindowTreeHostMojo::GetEventProcessor() { | 160 ui::EventProcessor* WindowTreeHostMojo::GetEventProcessor() { |
161 return dispatcher(); | 161 return dispatcher(); |
162 } | 162 } |
163 | 163 |
164 //////////////////////////////////////////////////////////////////////////////// | 164 //////////////////////////////////////////////////////////////////////////////// |
165 // WindowTreeHostMojo, view_manager::NodeObserver implementation: | 165 // WindowTreeHostMojo, view_manager::NodeObserver implementation: |
166 | 166 |
167 void WindowTreeHostMojo::OnNodeBoundsChange( | 167 void WindowTreeHostMojo::OnNodeBoundsChanged( |
168 view_manager::Node* node, | 168 view_manager::Node* node, |
169 const gfx::Rect& old_bounds, | 169 const gfx::Rect& old_bounds, |
170 const gfx::Rect& new_bounds, | 170 const gfx::Rect& new_bounds) { |
171 view_manager::NodeObserver::DispositionChangePhase phase) { | |
172 bounds_ = new_bounds; | 171 bounds_ = new_bounds; |
173 if (old_bounds.origin() != new_bounds.origin()) | 172 if (old_bounds.origin() != new_bounds.origin()) |
174 OnHostMoved(bounds_.origin()); | 173 OnHostMoved(bounds_.origin()); |
175 if (old_bounds.size() != new_bounds.size()) | 174 if (old_bounds.size() != new_bounds.size()) |
176 OnHostResized(bounds_.size()); | 175 OnHostResized(bounds_.size()); |
177 } | 176 } |
178 | 177 |
179 } // namespace mojo | 178 } // namespace mojo |
OLD | NEW |