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 "ash/system/network/tray_network.h" | 5 #include "ash/system/network/tray_network.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 bool ResetInfoBubble() { | 541 bool ResetInfoBubble() { |
542 if (!info_bubble_) | 542 if (!info_bubble_) |
543 return false; | 543 return false; |
544 info_bubble_->GetWidget()->Close(); | 544 info_bubble_->GetWidget()->Close(); |
545 info_bubble_ = NULL; | 545 info_bubble_ = NULL; |
546 return true; | 546 return true; |
547 } | 547 } |
548 | 548 |
549 // Overridden from ButtonListener. | 549 // Overridden from ButtonListener. |
550 virtual void ButtonPressed(views::Button* sender, | 550 virtual void ButtonPressed(views::Button* sender, |
551 const views::Event& event) OVERRIDE { | 551 const ui::Event& event) OVERRIDE { |
552 ash::SystemTrayDelegate* delegate = | 552 ash::SystemTrayDelegate* delegate = |
553 ash::Shell::GetInstance()->tray_delegate(); | 553 ash::Shell::GetInstance()->tray_delegate(); |
554 if (sender == info_icon_) { | 554 if (sender == info_icon_) { |
555 ToggleInfoBubble(); | 555 ToggleInfoBubble(); |
556 return; | 556 return; |
557 } | 557 } |
558 | 558 |
559 // If the info bubble was visible, close it when some other item is clicked | 559 // If the info bubble was visible, close it when some other item is clicked |
560 // on. | 560 // on. |
561 ResetInfoBubble(); | 561 ResetInfoBubble(); |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 | 875 |
876 void TrayNetwork::LinkClicked(ErrorType error_type) { | 876 void TrayNetwork::LinkClicked(ErrorType error_type) { |
877 tray::NetworkErrors::ErrorMap::const_iterator iter = | 877 tray::NetworkErrors::ErrorMap::const_iterator iter = |
878 errors()->messages().find(error_type); | 878 errors()->messages().find(error_type); |
879 if (iter != errors()->messages().end() && iter->second.delegate) | 879 if (iter != errors()->messages().end() && iter->second.delegate) |
880 iter->second.delegate->NotificationLinkClicked(); | 880 iter->second.delegate->NotificationLinkClicked(); |
881 } | 881 } |
882 | 882 |
883 } // namespace internal | 883 } // namespace internal |
884 } // namespace ash | 884 } // namespace ash |
OLD | NEW |