| 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/common/system/chromeos/network/tray_vpn.h" | 5 #include "ash/common/system/chromeos/network/tray_vpn.h" |
| 6 | 6 |
| 7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
| 8 #include "ash/common/system/chromeos/network/network_state_list_detailed_view.h" | 8 #include "ash/common/system/chromeos/network/network_state_list_detailed_view.h" |
| 9 #include "ash/common/system/chromeos/network/vpn_delegate.h" | 9 #include "ash/common/system/chromeos/network/vpn_delegate.h" |
| 10 #include "ash/common/system/tray/system_tray.h" | 10 #include "ash/common/system/tray/system_tray.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 vpn, ui::network_icon::ICON_TYPE_DEFAULT_VIEW); | 105 vpn, ui::network_icon::ICON_TYPE_DEFAULT_VIEW); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(VpnDefaultView); | 109 DISALLOW_COPY_AND_ASSIGN(VpnDefaultView); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace tray | 112 } // namespace tray |
| 113 | 113 |
| 114 TrayVPN::TrayVPN(SystemTray* system_tray) | 114 TrayVPN::TrayVPN(SystemTray* system_tray) |
| 115 : SystemTrayItem(system_tray), default_(NULL), detailed_(NULL) { | 115 : SystemTrayItem(system_tray, UMA_VPN), |
| 116 default_(nullptr), |
| 117 detailed_(nullptr) { |
| 116 network_state_observer_.reset(new TrayNetworkStateObserver(this)); | 118 network_state_observer_.reset(new TrayNetworkStateObserver(this)); |
| 117 } | 119 } |
| 118 | 120 |
| 119 TrayVPN::~TrayVPN() {} | 121 TrayVPN::~TrayVPN() {} |
| 120 | 122 |
| 121 views::View* TrayVPN::CreateTrayView(LoginStatus status) { | 123 views::View* TrayVPN::CreateTrayView(LoginStatus status) { |
| 122 return NULL; | 124 return NULL; |
| 123 } | 125 } |
| 124 | 126 |
| 125 views::View* TrayVPN::CreateDefaultView(LoginStatus status) { | 127 views::View* TrayVPN::CreateDefaultView(LoginStatus status) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {} | 169 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {} |
| 168 | 170 |
| 169 void TrayVPN::NetworkStateChanged() { | 171 void TrayVPN::NetworkStateChanged() { |
| 170 if (default_) | 172 if (default_) |
| 171 default_->Update(); | 173 default_->Update(); |
| 172 if (detailed_) | 174 if (detailed_) |
| 173 detailed_->Update(); | 175 detailed_->Update(); |
| 174 } | 176 } |
| 175 | 177 |
| 176 } // namespace ash | 178 } // namespace ash |
| OLD | NEW |