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

Unified Diff: chrome/browser/chromeos/notifications/system_notification.cc

Issue 10693087: chromeos: Request screen lock directly from session manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/notifications/system_notification.cc
diff --git a/chrome/browser/chromeos/notifications/system_notification.cc b/chrome/browser/chromeos/notifications/system_notification.cc
index 587ce485cf5c9ae7a1c6c915f8fea25eec684c41..077a5ff9944e4d2ce3370b2ef4f3cda19c1554a1 100644
--- a/chrome/browser/chromeos/notifications/system_notification.cc
+++ b/chrome/browser/chromeos/notifications/system_notification.cc
@@ -16,7 +16,7 @@
namespace chromeos {
void SystemNotification::Init(int icon_resource_id) {
- DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this);
+ DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this);
collection_ = static_cast<BalloonCollectionImplAsh*>(
g_browser_process->notification_ui_manager()->balloon_collection());
std::string url = web_ui_util::GetImageDataUrlFromResource(icon_resource_id);
@@ -56,7 +56,7 @@ SystemNotification::SystemNotification(Profile* profile,
}
SystemNotification::~SystemNotification() {
- DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this);
+ DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
}
void SystemNotification::UnlockScreen() {
@@ -84,7 +84,8 @@ void SystemNotification::Show(const string16& message,
callback_ = callback;
sticky_ = sticky;
- if (DBusThreadManager::Get()->GetPowerManagerClient()->GetIsScreenLocked()) {
+ if (DBusThreadManager::Get()->GetSessionManagerClient()->
+ GetIsScreenLocked()) {
if (visible_ && urgent && !urgent_) {
// Hide the notification so that we show/update it on unlock.
Hide();

Powered by Google App Engine
This is Rietveld 408576698