Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: ash/shelf/overflow_bubble.cc

Issue 1957653003: mash: Don't close system tray bubble for clicks in menus/notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/shelf/overflow_bubble_view.h" 7 #include "ash/shelf/overflow_bubble_view.h"
8 #include "ash/shelf/shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shelf/shelf_view.h" 9 #include "ash/shelf/shelf_view.h"
10 #include "ash/shelf/shelf_widget.h" 10 #include "ash/shelf/shelf_widget.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::OnMousePressed(const gfx::Point& location_in_screen,
75 const gfx::Point& location_in_screen) { 75 views::Widget* target) {
76 ProcessPressedEvent(location_in_screen); 76 ProcessPressedEvent(location_in_screen);
77 } 77 }
78 78
79 void OverflowBubble::OnTouchPressed(const ui::TouchEvent& event, 79 void OverflowBubble::OnTouchPressed(const gfx::Point& location_in_screen,
80 const gfx::Point& location_in_screen) { 80 views::Widget* target) {
81 ProcessPressedEvent(location_in_screen); 81 ProcessPressedEvent(location_in_screen);
82 } 82 }
83 83
84 void OverflowBubble::OnWidgetDestroying(views::Widget* widget) { 84 void OverflowBubble::OnWidgetDestroying(views::Widget* widget) {
85 DCHECK(widget == bubble_->GetWidget()); 85 DCHECK(widget == bubble_->GetWidget());
86 bubble_ = NULL; 86 bubble_ = NULL;
87 anchor_ = NULL; 87 anchor_ = NULL;
88 shelf_view_->shelf()->SchedulePaint(); 88 shelf_view_->shelf()->SchedulePaint();
89 shelf_view_ = NULL; 89 shelf_view_ = NULL;
90 } 90 }
91 91
92 } // namespace ash 92 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698