OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/touchui/touch_selection_controller_impl.h" | 5 #include "ui/views/touchui/touch_selection_controller_impl.h" |
6 | 6 |
7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "ui/aura/client/cursor_client.h" | 9 #include "ui/aura/client/cursor_client.h" |
10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 } | 626 } |
627 | 627 |
628 void TouchSelectionControllerImpl::OnAncestorWindowTransformed( | 628 void TouchSelectionControllerImpl::OnAncestorWindowTransformed( |
629 aura::Window* window, | 629 aura::Window* window, |
630 aura::Window* ancestor) { | 630 aura::Window* ancestor) { |
631 client_view_->DestroyTouchSelection(); | 631 client_view_->DestroyTouchSelection(); |
632 } | 632 } |
633 | 633 |
634 void TouchSelectionControllerImpl::OnWidgetClosing(Widget* widget) { | 634 void TouchSelectionControllerImpl::OnWidgetClosing(Widget* widget) { |
635 DCHECK_EQ(client_widget_, widget); | 635 DCHECK_EQ(client_widget_, widget); |
| 636 client_widget_->RemoveObserver(this); |
636 client_widget_ = nullptr; | 637 client_widget_ = nullptr; |
637 } | 638 } |
638 | 639 |
639 void TouchSelectionControllerImpl::OnWidgetBoundsChanged( | 640 void TouchSelectionControllerImpl::OnWidgetBoundsChanged( |
640 Widget* widget, | 641 Widget* widget, |
641 const gfx::Rect& new_bounds) { | 642 const gfx::Rect& new_bounds) { |
642 DCHECK_EQ(client_widget_, widget); | 643 DCHECK_EQ(client_widget_, widget); |
643 SelectionChanged(); | 644 SelectionChanged(); |
644 } | 645 } |
645 | 646 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 | 750 |
750 views::WidgetDelegateView* TouchSelectionControllerImpl::GetHandle1View() { | 751 views::WidgetDelegateView* TouchSelectionControllerImpl::GetHandle1View() { |
751 return selection_handle_1_.get(); | 752 return selection_handle_1_.get(); |
752 } | 753 } |
753 | 754 |
754 views::WidgetDelegateView* TouchSelectionControllerImpl::GetHandle2View() { | 755 views::WidgetDelegateView* TouchSelectionControllerImpl::GetHandle2View() { |
755 return selection_handle_2_.get(); | 756 return selection_handle_2_.get(); |
756 } | 757 } |
757 | 758 |
758 } // namespace views | 759 } // namespace views |
OLD | NEW |