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

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

Issue 10095002: Remove TODO as code is working as is. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/screen_locker.h" 5 #include "chrome/browser/chromeos/login/screen_locker.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 content::NotificationService::AllSources()); 65 content::NotificationService::AllSources());
66 } 66 }
67 67
68 // NotificationObserver overrides: 68 // NotificationObserver overrides:
69 virtual void Observe(int type, 69 virtual void Observe(int type,
70 const content::NotificationSource& source, 70 const content::NotificationSource& source,
71 const content::NotificationDetails& details) OVERRIDE { 71 const content::NotificationDetails& details) OVERRIDE {
72 switch (type) { 72 switch (type) {
73 case chrome::NOTIFICATION_LOGIN_USER_CHANGED: { 73 case chrome::NOTIFICATION_LOGIN_USER_CHANGED: {
74 // Register Screen Lock only after a user has logged in. 74 // Register Screen Lock only after a user has logged in.
75 // TODO(flackr): Observe PowerManagerClient on desktop build.
76 // crbug.com/119798
77 chromeos::PowerManagerClient* power_manager = 75 chromeos::PowerManagerClient* power_manager =
78 chromeos::DBusThreadManager::Get()->GetPowerManagerClient(); 76 chromeos::DBusThreadManager::Get()->GetPowerManagerClient();
79 if (!power_manager->HasObserver(this)) 77 if (!power_manager->HasObserver(this))
80 power_manager->AddObserver(this); 78 power_manager->AddObserver(this);
81 break; 79 break;
82 } 80 }
83 81
84 case chrome::NOTIFICATION_SESSION_STARTED: { 82 case chrome::NOTIFICATION_SESSION_STARTED: {
85 session_started_ = true; 83 session_started_ = true;
86 break; 84 break;
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 bool state = true; 452 bool state = true;
455 content::NotificationService::current()->Notify( 453 content::NotificationService::current()->Notify(
456 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, 454 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
457 content::Source<ScreenLocker>(this), 455 content::Source<ScreenLocker>(this),
458 content::Details<bool>(&state)); 456 content::Details<bool>(&state));
459 DBusThreadManager::Get()->GetPowerManagerClient()-> 457 DBusThreadManager::Get()->GetPowerManagerClient()->
460 NotifyScreenLockCompleted(); 458 NotifyScreenLockCompleted();
461 } 459 }
462 460
463 } // namespace chromeos 461 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698