OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/aura/root_window.h" | 5 #include "ui/aura/root_window.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 if (status == ui::GESTURE_STATUS_CONSUMED) { | 271 if (status == ui::GESTURE_STATUS_CONSUMED) { |
272 gesture_handler_ = GestureEventHandlerForConsumedGesture( | 272 gesture_handler_ = GestureEventHandlerForConsumedGesture( |
273 translated_event, target); | 273 translated_event, target); |
274 } | 274 } |
275 return status != ui::GESTURE_STATUS_UNKNOWN; | 275 return status != ui::GESTURE_STATUS_UNKNOWN; |
276 } | 276 } |
277 | 277 |
278 return false; | 278 return false; |
279 } | 279 } |
280 | 280 |
| 281 void RootWindow::OnScreenWorkAreaInsetsChanged() { |
| 282 FOR_EACH_OBSERVER(RootWindowObserver, observers_, |
| 283 OnScreenWorkAreaInsetsChanged()); |
| 284 } |
| 285 |
281 void RootWindow::OnHostResized(const gfx::Size& size) { | 286 void RootWindow::OnHostResized(const gfx::Size& size) { |
282 // The compositor should have the same size as the native root window host. | 287 // The compositor should have the same size as the native root window host. |
283 compositor_->WidgetSizeChanged(size); | 288 compositor_->WidgetSizeChanged(size); |
284 | 289 |
285 // The layer, and all the observers should be notified of the | 290 // The layer, and all the observers should be notified of the |
286 // transformed size of the root window. | 291 // transformed size of the root window. |
287 gfx::Rect bounds(size); | 292 gfx::Rect bounds(size); |
288 layer()->transform().TransformRect(&bounds); | 293 layer()->transform().TransformRect(&bounds); |
289 SetBounds(gfx::Rect(bounds.size())); | 294 SetBounds(gfx::Rect(bounds.size())); |
290 FOR_EACH_OBSERVER(RootWindowObserver, observers_, | 295 FOR_EACH_OBSERVER(RootWindowObserver, observers_, |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 // is currently broken. See/ crbug.com/107931. | 836 // is currently broken. See/ crbug.com/107931. |
832 MouseEvent event(ui::ET_MOUSE_MOVED, | 837 MouseEvent event(ui::ET_MOUSE_MOVED, |
833 orig_mouse_location, | 838 orig_mouse_location, |
834 orig_mouse_location, | 839 orig_mouse_location, |
835 0); | 840 0); |
836 DispatchMouseEvent(&event); | 841 DispatchMouseEvent(&event); |
837 #endif | 842 #endif |
838 } | 843 } |
839 | 844 |
840 } // namespace aura | 845 } // namespace aura |
OLD | NEW |