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/chromeos/network/tray_network.h" | 5 #include "ash/system/chromeos/network/tray_network.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/chromeos/network/network_list_detailed_view_base.h" | 8 #include "ash/system/chromeos/network/network_list_detailed_view_base.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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 | 516 |
517 TrayNetwork::~TrayNetwork() { | 517 TrayNetwork::~TrayNetwork() { |
518 } | 518 } |
519 | 519 |
520 views::View* TrayNetwork::CreateTrayView(user::LoginStatus status) { | 520 views::View* TrayNetwork::CreateTrayView(user::LoginStatus status) { |
521 CHECK(tray_ == NULL); | 521 CHECK(tray_ == NULL); |
522 tray_ = new tray::NetworkTrayView(tray::LIGHT, true /*tray_icon*/); | 522 tray_ = new tray::NetworkTrayView(tray::LIGHT, true /*tray_icon*/); |
523 return tray_; | 523 return tray_; |
524 } | 524 } |
525 | 525 |
526 views::View* TrayNetwork::CreateDefaultView(user::LoginStatus status) { | 526 views::View* TrayNetwork::CreateDefaultView(user::LoginStatus status, |
| 527 int bubble_width) { |
527 CHECK(default_ == NULL); | 528 CHECK(default_ == NULL); |
528 default_ = | 529 default_ = |
529 new tray::NetworkDefaultView(this, status != user::LOGGED_IN_LOCKED); | 530 new tray::NetworkDefaultView(this, status != user::LOGGED_IN_LOCKED); |
530 return default_; | 531 return default_; |
531 } | 532 } |
532 | 533 |
533 views::View* TrayNetwork::CreateDetailedView(user::LoginStatus status) { | 534 views::View* TrayNetwork::CreateDetailedView(user::LoginStatus status) { |
534 CHECK(detailed_ == NULL); | 535 CHECK(detailed_ == NULL); |
535 // Clear any notifications when showing the detailed view. | 536 // Clear any notifications when showing the detailed view. |
536 messages_->messages().clear(); | 537 messages_->messages().clear(); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 | 624 |
624 void TrayNetwork::LinkClicked(MessageType message_type, int link_id) { | 625 void TrayNetwork::LinkClicked(MessageType message_type, int link_id) { |
625 tray::NetworkMessages::MessageMap::const_iterator iter = | 626 tray::NetworkMessages::MessageMap::const_iterator iter = |
626 messages()->messages().find(message_type); | 627 messages()->messages().find(message_type); |
627 if (iter != messages()->messages().end() && iter->second.delegate) | 628 if (iter != messages()->messages().end() && iter->second.delegate) |
628 iter->second.delegate->NotificationLinkClicked(link_id); | 629 iter->second.delegate->NotificationLinkClicked(link_id); |
629 } | 630 } |
630 | 631 |
631 } // namespace internal | 632 } // namespace internal |
632 } // namespace ash | 633 } // namespace ash |
OLD | NEW |