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

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

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase to get WorkspaceLayoutManagerSoloTest change Created 3 years, 9 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/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_controller.h"
8 #include "ash/common/system/chromeos/network/network_icon.h" 8 #include "ash/common/system/chromeos/network/network_icon.h"
9 #include "ash/common/system/chromeos/network/network_icon_animation.h" 9 #include "ash/common/system/chromeos/network/network_icon_animation.h"
10 #include "ash/common/system/chromeos/network/network_icon_animation_observer.h" 10 #include "ash/common/system/chromeos/network/network_icon_animation_observer.h"
11 #include "ash/common/system/chromeos/network/network_state_list_detailed_view.h" 11 #include "ash/common/system/chromeos/network/network_state_list_detailed_view.h"
12 #include "ash/common/system/chromeos/network/vpn_list.h" 12 #include "ash/common/system/chromeos/network/vpn_list.h"
13 #include "ash/common/system/tray/system_tray.h" 13 #include "ash/common/system/tray/system_tray.h"
14 #include "ash/common/system/tray/system_tray_delegate.h" 14 #include "ash/common/system/tray/system_tray_delegate.h"
15 #include "ash/common/system/tray/tray_constants.h" 15 #include "ash/common/system/tray/tray_constants.h"
16 #include "ash/common/system/tray/tray_item_more.h" 16 #include "ash/common/system/tray/tray_item_more.h"
17 #include "ash/common/system/tray/tray_popup_item_style.h" 17 #include "ash/common/system/tray/tray_popup_item_style.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 views::View* TrayVPN::CreateDefaultView(LoginStatus status) { 154 views::View* TrayVPN::CreateDefaultView(LoginStatus status) {
155 CHECK(default_ == NULL); 155 CHECK(default_ == NULL);
156 if (!chromeos::NetworkHandler::IsInitialized()) 156 if (!chromeos::NetworkHandler::IsInitialized())
157 return NULL; 157 return NULL;
158 if (status == LoginStatus::NOT_LOGGED_IN) 158 if (status == LoginStatus::NOT_LOGGED_IN)
159 return NULL; 159 return NULL;
160 if (!tray::VpnDefaultView::ShouldShow()) 160 if (!tray::VpnDefaultView::ShouldShow())
161 return NULL; 161 return NULL;
162 162
163 const bool is_in_secondary_login_screen = 163 const bool is_in_secondary_login_screen =
164 WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen(); 164 WmShell::Get()->session_controller()->IsInSecondaryLoginScreen();
165 165
166 default_ = new tray::VpnDefaultView(this); 166 default_ = new tray::VpnDefaultView(this);
167 default_->SetEnabled(status != LoginStatus::LOCKED && 167 default_->SetEnabled(status != LoginStatus::LOCKED &&
168 !is_in_secondary_login_screen); 168 !is_in_secondary_login_screen);
169 169
170 return default_; 170 return default_;
171 } 171 }
172 172
173 views::View* TrayVPN::CreateDetailedView(LoginStatus status) { 173 views::View* TrayVPN::CreateDetailedView(LoginStatus status) {
174 CHECK(detailed_ == NULL); 174 CHECK(detailed_ == NULL);
(...skipping 22 matching lines...) Expand all
197 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {} 197 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {}
198 198
199 void TrayVPN::NetworkStateChanged() { 199 void TrayVPN::NetworkStateChanged() {
200 if (default_) 200 if (default_)
201 default_->Update(); 201 default_->Update();
202 if (detailed_) 202 if (detailed_)
203 detailed_->Update(); 203 detailed_->Update();
204 } 204 }
205 205
206 } // namespace ash 206 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698