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

Side by Side Diff: chrome/browser/chromeos/login/webui_screen_locker.cc

Issue 22264004: Remove ConnectivityStateHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove redundant IsConnected() check Created 7 years, 4 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 | Annotate | Revision Log
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 "chrome/browser/chromeos/login/webui_screen_locker.h" 5 #include "chrome/browser/chromeos/login/webui_screen_locker.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/lock_state_controller.h" 8 #include "ash/wm/lock_state_controller.h"
9 #include "ash/wm/lock_state_observer.h" 9 #include "ash/wm/lock_state_observer.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 30 matching lines...) Expand all
41 41
42 namespace chromeos { 42 namespace chromeos {
43 43
44 //////////////////////////////////////////////////////////////////////////////// 44 ////////////////////////////////////////////////////////////////////////////////
45 // WebUIScreenLocker implementation. 45 // WebUIScreenLocker implementation.
46 46
47 WebUIScreenLocker::WebUIScreenLocker(ScreenLocker* screen_locker) 47 WebUIScreenLocker::WebUIScreenLocker(ScreenLocker* screen_locker)
48 : ScreenLockerDelegate(screen_locker), 48 : ScreenLockerDelegate(screen_locker),
49 lock_ready_(false), 49 lock_ready_(false),
50 webui_ready_(false), 50 webui_ready_(false),
51 network_state_helper_(new login::NetworkStateHelper),
51 weak_factory_(this) { 52 weak_factory_(this) {
52 set_should_emit_login_prompt_visible(false); 53 set_should_emit_login_prompt_visible(false);
53 ash::Shell::GetInstance()->lock_state_controller()->AddObserver(this); 54 ash::Shell::GetInstance()->lock_state_controller()->AddObserver(this);
54 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); 55 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this);
55 } 56 }
56 57
57 void WebUIScreenLocker::LockScreen() { 58 void WebUIScreenLocker::LockScreen() {
58 gfx::Rect bounds(ash::Shell::GetScreen()->GetPrimaryDisplay().bounds()); 59 gfx::Rect bounds(ash::Shell::GetScreen()->GetPrimaryDisplay().bounds());
59 60
60 lock_time_ = base::TimeTicks::Now(); 61 lock_time_ = base::TimeTicks::Now();
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 194
194 void WebUIScreenLocker::CreateAccount() { 195 void WebUIScreenLocker::CreateAccount() {
195 NOTREACHED(); 196 NOTREACHED();
196 } 197 }
197 198
198 void WebUIScreenLocker::CompleteLogin(const UserContext& user_context) { 199 void WebUIScreenLocker::CompleteLogin(const UserContext& user_context) {
199 NOTREACHED(); 200 NOTREACHED();
200 } 201 }
201 202
202 string16 WebUIScreenLocker::GetConnectedNetworkName() { 203 string16 WebUIScreenLocker::GetConnectedNetworkName() {
203 return GetCurrentNetworkName(); 204 return network_state_helper_->GetCurrentNetworkName();
204 } 205 }
205 206
206 bool WebUIScreenLocker::IsSigninInProgress() const { 207 bool WebUIScreenLocker::IsSigninInProgress() const {
207 // The way how screen locker is implemented right now there's no 208 // The way how screen locker is implemented right now there's no
208 // GAIA sign in in progress in any case. 209 // GAIA sign in in progress in any case.
209 return false; 210 return false;
210 } 211 }
211 212
212 void WebUIScreenLocker::Login(const UserContext& user_context) { 213 void WebUIScreenLocker::Login(const UserContext& user_context) {
213 chromeos::ScreenLocker::default_screen_locker()->Authenticate(user_context); 214 chromeos::ScreenLocker::default_screen_locker()->Authenticate(user_context);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 322
322 void WebUIScreenLocker::RenderProcessGone(base::TerminationStatus status) { 323 void WebUIScreenLocker::RenderProcessGone(base::TerminationStatus status) {
323 if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID && 324 if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID &&
324 status != base::TERMINATION_STATUS_NORMAL_TERMINATION) { 325 status != base::TERMINATION_STATUS_NORMAL_TERMINATION) {
325 LOG(ERROR) << "Renderer crash on lock screen"; 326 LOG(ERROR) << "Renderer crash on lock screen";
326 Signout(); 327 Signout();
327 } 328 }
328 } 329 }
329 330
330 } // namespace chromeos 331 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_screen_locker.h ('k') | chrome/browser/chromeos/net/connectivity_state_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698