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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 } | 646 } |
647 } | 647 } |
648 | 648 |
649 void RootWindow::OnWindowAttachedToRootWindow(Window* attached) { | 649 void RootWindow::OnWindowAttachedToRootWindow(Window* attached) { |
650 if (attached->IsVisible() && | 650 if (attached->IsVisible() && |
651 attached->ContainsPointInRoot(last_mouse_location_)) | 651 attached->ContainsPointInRoot(last_mouse_location_)) |
652 PostMouseMoveEventAfterWindowChange(); | 652 PostMouseMoveEventAfterWindowChange(); |
653 } | 653 } |
654 | 654 |
655 void RootWindow::OnLayerAnimationEnded( | 655 void RootWindow::OnLayerAnimationEnded( |
656 const ui::LayerAnimationSequence* animation) { | 656 ui::LayerAnimationSequence* animation) { |
657 OnHostResized(host_->GetSize()); | 657 OnHostResized(host_->GetSize()); |
658 } | 658 } |
659 | 659 |
660 void RootWindow::OnLayerAnimationScheduled( | 660 void RootWindow::OnLayerAnimationScheduled( |
661 const ui::LayerAnimationSequence* animation) { | 661 ui::LayerAnimationSequence* animation) { |
662 } | 662 } |
663 | 663 |
664 void RootWindow::OnLayerAnimationAborted( | 664 void RootWindow::OnLayerAnimationAborted( |
665 const ui::LayerAnimationSequence* animation) { | 665 ui::LayerAnimationSequence* animation) { |
666 } | 666 } |
667 | 667 |
668 void RootWindow::SetFocusedWindow(Window* focused_window) { | 668 void RootWindow::SetFocusedWindow(Window* focused_window) { |
669 if (focused_window == focused_window_) | 669 if (focused_window == focused_window_) |
670 return; | 670 return; |
671 if (focused_window && !focused_window->CanFocus()) | 671 if (focused_window && !focused_window->CanFocus()) |
672 return; | 672 return; |
673 // The NULL-check of |focused_window| is essential here before asking the | 673 // The NULL-check of |focused_window| is essential here before asking the |
674 // activation client, since it is valid to clear the focus by calling | 674 // activation client, since it is valid to clear the focus by calling |
675 // SetFocusedWindow() to NULL. | 675 // SetFocusedWindow() to NULL. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 // TODO(derat|oshima): Don't use mouse_button_flags_ as it's | 745 // TODO(derat|oshima): Don't use mouse_button_flags_ as it's |
746 // is currently broken. See/ crbug.com/107931. | 746 // is currently broken. See/ crbug.com/107931. |
747 MouseEvent event(ui::ET_MOUSE_MOVED, | 747 MouseEvent event(ui::ET_MOUSE_MOVED, |
748 orig_mouse_location, | 748 orig_mouse_location, |
749 orig_mouse_location, | 749 orig_mouse_location, |
750 0); | 750 0); |
751 DispatchMouseEvent(&event); | 751 DispatchMouseEvent(&event); |
752 } | 752 } |
753 | 753 |
754 } // namespace aura | 754 } // namespace aura |
OLD | NEW |