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/views/widget/root_view.h" | 5 #include "ui/views/widget/root_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 if (event_dispatch_target_ == details.child) | 632 if (event_dispatch_target_ == details.child) |
633 event_dispatch_target_ = NULL; | 633 event_dispatch_target_ = NULL; |
634 } | 634 } |
635 } | 635 } |
636 | 636 |
637 void RootView::VisibilityChanged(View* /*starting_from*/, bool is_visible) { | 637 void RootView::VisibilityChanged(View* /*starting_from*/, bool is_visible) { |
638 if (!is_visible) { | 638 if (!is_visible) { |
639 // When the root view is being hidden (e.g. when widget is minimized) | 639 // When the root view is being hidden (e.g. when widget is minimized) |
640 // handlers are reset, so that after it is reshown, events are not captured | 640 // handlers are reset, so that after it is reshown, events are not captured |
641 // by old handlers. | 641 // by old handlers. |
| 642 explicit_mouse_handler_ = false; |
642 mouse_pressed_handler_ = NULL; | 643 mouse_pressed_handler_ = NULL; |
643 mouse_move_handler_ = NULL; | 644 mouse_move_handler_ = NULL; |
644 touch_pressed_handler_ = NULL; | 645 touch_pressed_handler_ = NULL; |
645 gesture_handler_ = NULL; | 646 gesture_handler_ = NULL; |
646 scroll_gesture_handler_ = NULL; | 647 scroll_gesture_handler_ = NULL; |
647 event_dispatch_target_ = NULL; | 648 event_dispatch_target_ = NULL; |
648 } | 649 } |
649 } | 650 } |
650 | 651 |
651 void RootView::OnPaint(gfx::Canvas* canvas) { | 652 void RootView::OnPaint(gfx::Canvas* canvas) { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 return; | 723 return; |
723 } | 724 } |
724 } | 725 } |
725 | 726 |
726 bool RootView::CanDispatchToTarget(ui::EventTarget* target) { | 727 bool RootView::CanDispatchToTarget(ui::EventTarget* target) { |
727 return event_dispatch_target_ == target; | 728 return event_dispatch_target_ == target; |
728 } | 729 } |
729 | 730 |
730 } // namespace internal | 731 } // namespace internal |
731 } // namespace views | 732 } // namespace views |
OLD | NEW |