OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ash/shelf/overflow_bubble.h" | 5 #include "ash/shelf/overflow_bubble.h" |
6 | 6 |
7 #include "ash/common/system/tray/tray_background_view.h" | 7 #include "ash/common/system/tray/tray_background_view.h" |
8 #include "ash/shelf/overflow_bubble_view.h" | 8 #include "ash/shelf/overflow_bubble_view.h" |
9 #include "ash/shelf/shelf.h" | 9 #include "ash/shelf/shelf.h" |
10 #include "ash/shelf/shelf_view.h" | 10 #include "ash/shelf/shelf_view.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 void OverflowBubble::ProcessPressedEvent( | 65 void OverflowBubble::ProcessPressedEvent( |
66 const gfx::Point& event_location_in_screen) { | 66 const gfx::Point& event_location_in_screen) { |
67 if (IsShowing() && !shelf_view_->IsShowingMenu() && | 67 if (IsShowing() && !shelf_view_->IsShowingMenu() && |
68 !bubble_->GetBoundsInScreen().Contains(event_location_in_screen) && | 68 !bubble_->GetBoundsInScreen().Contains(event_location_in_screen) && |
69 !anchor_->GetBoundsInScreen().Contains(event_location_in_screen)) { | 69 !anchor_->GetBoundsInScreen().Contains(event_location_in_screen)) { |
70 HideBubbleAndRefreshButton(); | 70 HideBubbleAndRefreshButton(); |
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 void OverflowBubble::OnMousePressed(const ui::MouseEvent& event, | 74 void OverflowBubble::OnMousePressObserved(const ui::MouseEvent& event, |
75 const gfx::Point& location_in_screen, | 75 const gfx::Point& location_in_screen, |
76 views::Widget* target) { | 76 views::Widget* target) { |
77 ProcessPressedEvent(location_in_screen); | 77 ProcessPressedEvent(location_in_screen); |
78 } | 78 } |
79 | 79 |
80 void OverflowBubble::OnTouchPressed(const ui::TouchEvent& event, | 80 void OverflowBubble::OnTouchPressObserved(const ui::TouchEvent& event, |
81 const gfx::Point& location_in_screen, | 81 const gfx::Point& location_in_screen, |
82 views::Widget* target) { | 82 views::Widget* target) { |
83 ProcessPressedEvent(location_in_screen); | 83 ProcessPressedEvent(location_in_screen); |
84 } | 84 } |
85 | 85 |
| 86 void OverflowBubble::OnTouchReleaseObserved( |
| 87 const ui::TouchEvent& event, |
| 88 const gfx::Point& location_in_screen, |
| 89 views::Widget* target) {} |
| 90 |
| 91 void OverflowBubble::OnTouchMoveObserved(const ui::TouchEvent& event, |
| 92 const gfx::Point& location_in_screen, |
| 93 views::Widget* target) {} |
| 94 |
| 95 void OverflowBubble::OnTouchCancellObserved( |
| 96 const ui::TouchEvent& event, |
| 97 const gfx::Point& location_in_screen, |
| 98 views::Widget* target) {} |
| 99 |
86 void OverflowBubble::OnWidgetDestroying(views::Widget* widget) { | 100 void OverflowBubble::OnWidgetDestroying(views::Widget* widget) { |
87 DCHECK(widget == bubble_->GetWidget()); | 101 DCHECK(widget == bubble_->GetWidget()); |
88 bubble_ = NULL; | 102 bubble_ = NULL; |
89 anchor_ = NULL; | 103 anchor_ = NULL; |
90 shelf_view_->shelf()->SchedulePaint(); | 104 shelf_view_->shelf()->SchedulePaint(); |
91 shelf_view_ = NULL; | 105 shelf_view_ = NULL; |
92 } | 106 } |
93 | 107 |
94 } // namespace ash | 108 } // namespace ash |
OLD | NEW |