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

Side by Side Diff: chromeos/dbus/fake_power_manager_client.cc

Issue 2805433002: Adding ArcBridge interface for synchronizing brightness settings (Closed)
Patch Set: Clean things up Created 3 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chromeos/dbus/fake_power_manager_client.h" 5 #include "chromeos/dbus/fake_power_manager_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void FakePowerManagerClient::DecreaseScreenBrightness(bool allow_off) {} 52 void FakePowerManagerClient::DecreaseScreenBrightness(bool allow_off) {}
53 53
54 void FakePowerManagerClient::IncreaseScreenBrightness() {} 54 void FakePowerManagerClient::IncreaseScreenBrightness() {}
55 55
56 void FakePowerManagerClient::SetScreenBrightnessPercent(double percent, 56 void FakePowerManagerClient::SetScreenBrightnessPercent(double percent,
57 bool gradual) {} 57 bool gradual) {}
58 58
59 void FakePowerManagerClient::GetScreenBrightnessPercent( 59 void FakePowerManagerClient::GetScreenBrightnessPercent(
60 const GetScreenBrightnessPercentCallback& callback) {} 60 const GetScreenBrightnessPercentCallback& callback) {}
61 61
62 void FakePowerManagerClient::SyncScreenBrightness() {}
63
62 void FakePowerManagerClient::DecreaseKeyboardBrightness() {} 64 void FakePowerManagerClient::DecreaseKeyboardBrightness() {}
63 65
64 void FakePowerManagerClient::IncreaseKeyboardBrightness() {} 66 void FakePowerManagerClient::IncreaseKeyboardBrightness() {}
65 67
66 void FakePowerManagerClient::RequestStatusUpdate() { 68 void FakePowerManagerClient::RequestStatusUpdate() {
67 // RequestStatusUpdate() calls and notifies the observers 69 // RequestStatusUpdate() calls and notifies the observers
68 // asynchronously on a real device. On the fake implementation, we call 70 // asynchronously on a real device. On the fake implementation, we call
69 // observers in a posted task to emulate the same behavior. 71 // observers in a posted task to emulate the same behavior.
70 base::ThreadTaskRunnerHandle::Get()->PostTask( 72 base::ThreadTaskRunnerHandle::Get()->PostTask(
71 FROM_HERE, base::Bind(&FakePowerManagerClient::NotifyObservers, 73 FROM_HERE, base::Bind(&FakePowerManagerClient::NotifyObservers,
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 observer.PowerChanged(props_); 198 observer.PowerChanged(props_);
197 } 199 }
198 200
199 void FakePowerManagerClient::HandleSuspendReadiness() { 201 void FakePowerManagerClient::HandleSuspendReadiness() {
200 CHECK(num_pending_suspend_readiness_callbacks_ > 0); 202 CHECK(num_pending_suspend_readiness_callbacks_ > 0);
201 203
202 --num_pending_suspend_readiness_callbacks_; 204 --num_pending_suspend_readiness_callbacks_;
203 } 205 }
204 206
205 } // namespace chromeos 207 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698