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/power/power_button_observer.h" | 5 #include "chrome/browser/chromeos/power/power_button_observer.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/wm/power_button_controller.h" | 8 #include "ash/wm/power_button_controller.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | |
11 #include "chrome/browser/chromeos/login/screen_locker.h" | 10 #include "chrome/browser/chromeos/login/screen_locker.h" |
12 #include "chrome/browser/chromeos/login/user.h" | 11 #include "chrome/browser/chromeos/login/user.h" |
13 #include "chrome/browser/chromeos/login/user_manager.h" | 12 #include "chrome/browser/chromeos/login/user_manager.h" |
14 #include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeo
s.h" | 13 #include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeo
s.h" |
15 #include "chrome/common/chrome_notification_types.h" | 14 #include "chrome/common/chrome_notification_types.h" |
| 15 #include "chromeos/dbus/dbus_thread_manager.h" |
16 #include "content/public/browser/notification_service.h" | 16 #include "content/public/browser/notification_service.h" |
17 | 17 |
18 namespace chromeos { | 18 namespace chromeos { |
19 | 19 |
20 PowerButtonObserver::PowerButtonObserver() { | 20 PowerButtonObserver::PowerButtonObserver() { |
21 ash::PowerButtonController* controller = | 21 ash::PowerButtonController* controller = |
22 ash::Shell::GetInstance()->power_button_controller(); | 22 ash::Shell::GetInstance()->power_button_controller(); |
23 controller->set_delegate(new PowerButtonControllerDelegateChromeos); | 23 controller->set_delegate(new PowerButtonControllerDelegateChromeos); |
24 | 24 |
25 registrar_.Add( | 25 registrar_.Add( |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 bool down, const base::TimeTicks& timestamp) { | 86 bool down, const base::TimeTicks& timestamp) { |
87 ash::Shell::GetInstance()->power_button_controller()-> | 87 ash::Shell::GetInstance()->power_button_controller()-> |
88 OnLockButtonEvent(down, timestamp); | 88 OnLockButtonEvent(down, timestamp); |
89 } | 89 } |
90 | 90 |
91 void PowerButtonObserver::LockScreen() { | 91 void PowerButtonObserver::LockScreen() { |
92 ash::Shell::GetInstance()->power_button_controller()->OnStartingLock(); | 92 ash::Shell::GetInstance()->power_button_controller()->OnStartingLock(); |
93 } | 93 } |
94 | 94 |
95 } // namespace chromeos | 95 } // namespace chromeos |
OLD | NEW |