| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 } | 348 } |
| 349 | 349 |
| 350 void RootWindow::OnWindowTransformed(Window* window, bool contained_mouse) { | 350 void RootWindow::OnWindowTransformed(Window* window, bool contained_mouse) { |
| 351 if (contained_mouse || | 351 if (contained_mouse || |
| 352 (window->IsVisible() && | 352 (window->IsVisible() && |
| 353 window->ContainsPointInRoot(last_mouse_location_))) { | 353 window->ContainsPointInRoot(last_mouse_location_))) { |
| 354 PostMouseMoveEventAfterWindowChange(); | 354 PostMouseMoveEventAfterWindowChange(); |
| 355 } | 355 } |
| 356 } | 356 } |
| 357 | 357 |
| 358 void RootWindow::OnKeyboardMappingChanged() { |
| 359 FOR_EACH_OBSERVER(RootWindowObserver, observers_, |
| 360 OnKeyboardMappingChanged(this)); |
| 361 } |
| 362 |
| 358 void RootWindow::AddRootWindowObserver(RootWindowObserver* observer) { | 363 void RootWindow::AddRootWindowObserver(RootWindowObserver* observer) { |
| 359 observers_.AddObserver(observer); | 364 observers_.AddObserver(observer); |
| 360 } | 365 } |
| 361 | 366 |
| 362 void RootWindow::RemoveRootWindowObserver(RootWindowObserver* observer) { | 367 void RootWindow::RemoveRootWindowObserver(RootWindowObserver* observer) { |
| 363 observers_.RemoveObserver(observer); | 368 observers_.RemoveObserver(observer); |
| 364 } | 369 } |
| 365 | 370 |
| 366 void RootWindow::PostNativeEvent(const base::NativeEvent& native_event) { | 371 void RootWindow::PostNativeEvent(const base::NativeEvent& native_event) { |
| 367 #if !defined(OS_MACOSX) | 372 #if !defined(OS_MACOSX) |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 void RootWindow::UnlockCompositor() { | 878 void RootWindow::UnlockCompositor() { |
| 874 DCHECK(compositor_lock_); | 879 DCHECK(compositor_lock_); |
| 875 compositor_lock_ = NULL; | 880 compositor_lock_ = NULL; |
| 876 if (draw_on_compositor_unlock_) { | 881 if (draw_on_compositor_unlock_) { |
| 877 draw_on_compositor_unlock_ = false; | 882 draw_on_compositor_unlock_ = false; |
| 878 ScheduleDraw(); | 883 ScheduleDraw(); |
| 879 } | 884 } |
| 880 } | 885 } |
| 881 | 886 |
| 882 } // namespace aura | 887 } // namespace aura |
| OLD | NEW |