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

Side by Side Diff: chrome/browser/chromeos/power/brightness_observer.cc

Issue 12089062: Move API functions registrations out of ExtensionFunctionRegistry. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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/power/brightness_observer.h" 5 #include "chrome/browser/chromeos/power/brightness_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 "chrome/browser/chromeos/login/user_manager.h" 9 #include "chrome/browser/chromeos/login/user_manager.h"
10 #include "chrome/browser/extensions/system/system_api.h" 10 #include "chrome/browser/extensions/api/system_private/system_private_api.h"
11 #include "chrome/browser/lifetime/application_lifetime.h" 11 #include "chrome/browser/lifetime/application_lifetime.h"
12 #include "chromeos/dbus/dbus_thread_manager.h" 12 #include "chromeos/dbus/dbus_thread_manager.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 BrightnessObserver::BrightnessObserver() { 16 BrightnessObserver::BrightnessObserver() {
17 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); 17 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this);
18 } 18 }
19 19
20 BrightnessObserver::~BrightnessObserver() { 20 BrightnessObserver::~BrightnessObserver() {
(...skipping 11 matching lines...) Expand all
32 // as soon as the screen turns off. 32 // as soon as the screen turns off.
33 // This implementation will be superseded after a revamp of the power manager 33 // This implementation will be superseded after a revamp of the power manager
34 // is complete, see crbug.com/161267. 34 // is complete, see crbug.com/161267.
35 if (UserManager::Get()->IsLoggedInAsPublicAccount() && 35 if (UserManager::Get()->IsLoggedInAsPublicAccount() &&
36 !level && !user_initiated) { 36 !level && !user_initiated) {
37 browser::AttemptUserExit(); 37 browser::AttemptUserExit();
38 } 38 }
39 } 39 }
40 40
41 } // namespace chromeos 41 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698