OLD | NEW |
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 28 matching lines...) Expand all Loading... |
39 #include "chrome/common/chrome_notification_types.h" | 39 #include "chrome/common/chrome_notification_types.h" |
40 #include "chrome/common/chrome_switches.h" | 40 #include "chrome/common/chrome_switches.h" |
41 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
42 #include "content/public/browser/notification_service.h" | 42 #include "content/public/browser/notification_service.h" |
43 #include "content/public/browser/user_metrics.h" | 43 #include "content/public/browser/user_metrics.h" |
44 #include "googleurl/src/gurl.h" | 44 #include "googleurl/src/gurl.h" |
45 #include "grit/generated_resources.h" | 45 #include "grit/generated_resources.h" |
46 #include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h" | 46 #include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h" |
47 #include "ui/base/l10n/l10n_util.h" | 47 #include "ui/base/l10n/l10n_util.h" |
48 | 48 |
49 #if defined(TOOLKIT_USES_GTK) | |
50 #include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h" | |
51 #endif | |
52 | |
53 using content::BrowserThread; | 49 using content::BrowserThread; |
54 using content::UserMetricsAction; | 50 using content::UserMetricsAction; |
55 | 51 |
56 namespace { | 52 namespace { |
57 | 53 |
58 // Observer to start ScreenLocker when the screen lock | 54 // Observer to start ScreenLocker when the screen lock |
59 class ScreenLockObserver : public chromeos::PowerManagerClient::Observer, | 55 class ScreenLockObserver : public chromeos::PowerManagerClient::Observer, |
60 public content::NotificationObserver { | 56 public content::NotificationObserver { |
61 public: | 57 public: |
62 ScreenLockObserver() : session_started_(false) { | 58 ScreenLockObserver() : session_started_(false) { |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 bool state = true; | 435 bool state = true; |
440 content::NotificationService::current()->Notify( | 436 content::NotificationService::current()->Notify( |
441 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, | 437 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, |
442 content::Source<ScreenLocker>(this), | 438 content::Source<ScreenLocker>(this), |
443 content::Details<bool>(&state)); | 439 content::Details<bool>(&state)); |
444 DBusThreadManager::Get()->GetPowerManagerClient()-> | 440 DBusThreadManager::Get()->GetPowerManagerClient()-> |
445 NotifyScreenLockCompleted(); | 441 NotifyScreenLockCompleted(); |
446 } | 442 } |
447 | 443 |
448 } // namespace chromeos | 444 } // namespace chromeos |
OLD | NEW |