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

Side by Side Diff: ash/system/tray/system_tray.cc

Issue 1918183003: mash: Close the system tray bubble on click outside its bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pointerwatcher
Patch Set: rebase 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
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | ash/system/tray/tray_background_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/system/tray/system_tray.h" 5 #include "ash/system/tray/system_tray.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/metrics/user_metrics_recorder.h" 8 #include "ash/metrics/user_metrics_recorder.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_util.h" 10 #include "ash/shelf/shelf_util.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 if (system_bubble_.get() && bubble_view == system_bubble_->bubble_view()) { 646 if (system_bubble_.get() && bubble_view == system_bubble_->bubble_view()) {
647 DestroySystemBubble(); 647 DestroySystemBubble();
648 UpdateNotificationBubble(); // State changed, re-create notifications. 648 UpdateNotificationBubble(); // State changed, re-create notifications.
649 GetShelfLayoutManager()->UpdateAutoHideState(); 649 GetShelfLayoutManager()->UpdateAutoHideState();
650 } else if (notification_bubble_.get() && 650 } else if (notification_bubble_.get() &&
651 bubble_view == notification_bubble_->bubble_view()) { 651 bubble_view == notification_bubble_->bubble_view()) {
652 DestroyNotificationBubble(); 652 DestroyNotificationBubble();
653 } 653 }
654 } 654 }
655 655
656 bool SystemTray::ClickedOutsideBubble() { 656 void SystemTray::ClickedOutsideBubble() {
657 if (!system_bubble_ || system_bubble_->is_persistent()) 657 if (!system_bubble_ || system_bubble_->is_persistent())
658 return false; 658 return;
659 HideBubbleWithView(system_bubble_->bubble_view()); 659 HideBubbleWithView(system_bubble_->bubble_view());
660 return true;
661 } 660 }
662 661
663 void SystemTray::BubbleViewDestroyed() { 662 void SystemTray::BubbleViewDestroyed() {
664 if (system_bubble_) { 663 if (system_bubble_) {
665 system_bubble_->bubble()->DestroyItemViews(); 664 system_bubble_->bubble()->DestroyItemViews();
666 system_bubble_->bubble()->BubbleViewDestroyed(); 665 system_bubble_->bubble()->BubbleViewDestroyed();
667 } 666 }
668 } 667 }
669 668
670 void SystemTray::OnMouseEnteredView() { 669 void SystemTray::OnMouseEnteredView() {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 system_bubble_.reset(); 726 system_bubble_.reset();
728 // When closing a system bubble with the alternate shelf layout, we need to 727 // When closing a system bubble with the alternate shelf layout, we need to
729 // turn off the active tinting of the shelf. 728 // turn off the active tinting of the shelf.
730 if (full_system_tray_menu_) { 729 if (full_system_tray_menu_) {
731 SetDrawBackgroundAsActive(false); 730 SetDrawBackgroundAsActive(false);
732 full_system_tray_menu_ = false; 731 full_system_tray_menu_ = false;
733 } 732 }
734 } 733 }
735 734
736 } // namespace ash 735 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | ash/system/tray/tray_background_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698