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

Side by Side Diff: ash/system/network/tray_vpn.cc

Issue 2808723004: Renames WmShell to ShellPort (Closed)
Patch Set: feedback Created 3 years, 8 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 (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_vpn.h" 5 #include "ash/system/network/tray_vpn.h"
6 6
7 #include "ash/resources/vector_icons/vector_icons.h" 7 #include "ash/resources/vector_icons/vector_icons.h"
8 #include "ash/session/session_controller.h" 8 #include "ash/session/session_controller.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_port.h"
10 #include "ash/strings/grit/ash_strings.h" 11 #include "ash/strings/grit/ash_strings.h"
11 #include "ash/system/network/network_icon.h" 12 #include "ash/system/network/network_icon.h"
12 #include "ash/system/network/network_icon_animation.h" 13 #include "ash/system/network/network_icon_animation.h"
13 #include "ash/system/network/network_icon_animation_observer.h" 14 #include "ash/system/network/network_icon_animation_observer.h"
14 #include "ash/system/network/network_state_list_detailed_view.h" 15 #include "ash/system/network/network_state_list_detailed_view.h"
15 #include "ash/system/network/vpn_list.h" 16 #include "ash/system/network/vpn_list.h"
16 #include "ash/system/tray/system_tray.h" 17 #include "ash/system/tray/system_tray.h"
17 #include "ash/system/tray/system_tray_delegate.h" 18 #include "ash/system/tray/system_tray_delegate.h"
18 #include "ash/system/tray/tray_constants.h" 19 #include "ash/system/tray/tray_constants.h"
19 #include "ash/system/tray/tray_item_more.h" 20 #include "ash/system/tray/tray_item_more.h"
20 #include "ash/system/tray/tray_popup_item_style.h" 21 #include "ash/system/tray/tray_popup_item_style.h"
21 #include "ash/wm_shell.h"
22 #include "chromeos/network/network_state.h" 22 #include "chromeos/network/network_state.h"
23 #include "chromeos/network/network_state_handler.h" 23 #include "chromeos/network/network_state_handler.h"
24 #include "third_party/cros_system_api/dbus/service_constants.h" 24 #include "third_party/cros_system_api/dbus/service_constants.h"
25 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
26 #include "ui/gfx/paint_vector_icon.h" 26 #include "ui/gfx/paint_vector_icon.h"
27 27
28 using chromeos::NetworkHandler; 28 using chromeos::NetworkHandler;
29 using chromeos::NetworkState; 29 using chromeos::NetworkState;
30 using chromeos::NetworkStateHandler; 30 using chromeos::NetworkStateHandler;
31 using chromeos::NetworkTypePattern; 31 using chromeos::NetworkTypePattern;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 !is_in_secondary_login_screen); 169 !is_in_secondary_login_screen);
170 170
171 return default_; 171 return default_;
172 } 172 }
173 173
174 views::View* TrayVPN::CreateDetailedView(LoginStatus status) { 174 views::View* TrayVPN::CreateDetailedView(LoginStatus status) {
175 CHECK(detailed_ == NULL); 175 CHECK(detailed_ == NULL);
176 if (!chromeos::NetworkHandler::IsInitialized()) 176 if (!chromeos::NetworkHandler::IsInitialized())
177 return NULL; 177 return NULL;
178 178
179 WmShell::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_DETAILED_VPN_VIEW); 179 ShellPort::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_DETAILED_VPN_VIEW);
180 detailed_ = new tray::NetworkStateListDetailedView( 180 detailed_ = new tray::NetworkStateListDetailedView(
181 this, tray::NetworkStateListDetailedView::LIST_TYPE_VPN, status); 181 this, tray::NetworkStateListDetailedView::LIST_TYPE_VPN, status);
182 detailed_->Init(); 182 detailed_->Init();
183 return detailed_; 183 return detailed_;
184 } 184 }
185 185
186 void TrayVPN::DestroyTrayView() {} 186 void TrayVPN::DestroyTrayView() {}
187 187
188 void TrayVPN::DestroyDefaultView() { 188 void TrayVPN::DestroyDefaultView() {
189 default_ = NULL; 189 default_ = NULL;
190 } 190 }
191 191
192 void TrayVPN::DestroyDetailedView() { 192 void TrayVPN::DestroyDetailedView() {
193 detailed_ = NULL; 193 detailed_ = NULL;
194 } 194 }
195 195
196 void TrayVPN::UpdateAfterLoginStatusChange(LoginStatus status) {} 196 void TrayVPN::UpdateAfterLoginStatusChange(LoginStatus status) {}
197 197
198 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {} 198 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {}
199 199
200 void TrayVPN::NetworkStateChanged() { 200 void TrayVPN::NetworkStateChanged() {
201 if (default_) 201 if (default_)
202 default_->Update(); 202 default_->Update();
203 if (detailed_) 203 if (detailed_)
204 detailed_->Update(); 204 detailed_->Update();
205 } 205 }
206 206
207 } // namespace ash 207 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698