Move VariationsRegistrySyncerWin to ChromeVariationsServiceClient
[chromium-blink-merge.git] / chromeos / dbus / fake_amplifier_client.cc
blob032dd755186f76d1cf78cc30713bc05cab8070dc
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chromeos/dbus/fake_amplifier_client.h"
7 #include "base/bind.h"
8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h"
12 namespace chromeos {
14 namespace {
16 void OnBoolDBusMethod(const BoolDBusMethodCallback& callback) {
17 callback.Run(DBUS_METHOD_CALL_SUCCESS, true);
20 void OnVoidDBusMethod(const VoidDBusMethodCallback& callback) {
21 callback.Run(DBUS_METHOD_CALL_SUCCESS);
24 } // anonymous namespace
26 FakeAmplifierClient::FakeAmplifierClient() {
29 FakeAmplifierClient::~FakeAmplifierClient() {
32 void FakeAmplifierClient::Init(dbus::Bus* bus) {
35 void FakeAmplifierClient::AddObserver(Observer* observer) {
38 void FakeAmplifierClient::RemoveObserver(Observer* observer) {
41 void FakeAmplifierClient::Initialize(const BoolDBusMethodCallback& callback) {
42 base::ThreadTaskRunnerHandle::Get()->PostTask(
43 FROM_HERE, base::Bind(&OnBoolDBusMethod, callback));
46 void FakeAmplifierClient::SetStandbyMode(
47 bool standby,
48 const VoidDBusMethodCallback& callback) {
49 base::ThreadTaskRunnerHandle::Get()->PostTask(
50 FROM_HERE, base::Bind(&OnVoidDBusMethod, callback));
53 void FakeAmplifierClient::SetVolume(double db_spl,
54 const VoidDBusMethodCallback& callback) {
55 base::ThreadTaskRunnerHandle::Get()->PostTask(
56 FROM_HERE, base::Bind(&OnVoidDBusMethod, callback));
59 } // namespace chromeos