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

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

Issue 9838085: Move files inside chrome/browser/chromeos/dbus to chromeos/dbus (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase 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
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 "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
8 #include "chrome/browser/chromeos/ui/brightness_bubble.h" 7 #include "chrome/browser/chromeos/ui/brightness_bubble.h"
9 #include "chrome/browser/chromeos/ui/volume_bubble.h" 8 #include "chrome/browser/chromeos/ui/volume_bubble.h"
10 #include "chrome/browser/extensions/system/system_api.h" 9 #include "chrome/browser/extensions/system/system_api.h"
10 #include "chromeos/dbus/dbus_thread_manager.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 13
14 BrightnessObserver::BrightnessObserver() { 14 BrightnessObserver::BrightnessObserver() {
15 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); 15 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this);
16 } 16 }
17 17
18 BrightnessObserver::~BrightnessObserver() { 18 BrightnessObserver::~BrightnessObserver() {
19 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); 19 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this);
20 } 20 }
21 21
22 void BrightnessObserver::BrightnessChanged(int level, bool user_initiated) { 22 void BrightnessObserver::BrightnessChanged(int level, bool user_initiated) {
23 if (user_initiated) 23 if (user_initiated)
24 BrightnessBubble::GetInstance()->ShowBubble(level, true); 24 BrightnessBubble::GetInstance()->ShowBubble(level, true);
25 else 25 else
26 BrightnessBubble::GetInstance()->UpdateWithoutShowingBubble(level, true); 26 BrightnessBubble::GetInstance()->UpdateWithoutShowingBubble(level, true);
27 27
28 extensions::DispatchBrightnessChangedEvent(level, user_initiated); 28 extensions::DispatchBrightnessChangedEvent(level, user_initiated);
29 29
30 VolumeBubble::GetInstance()->HideBubble(); 30 VolumeBubble::GetInstance()->HideBubble();
31 } 31 }
32 32
33 } // namespace chromeos 33 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/power/brightness_observer.h ('k') | chrome/browser/chromeos/power/low_battery_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698