| OLD | NEW |
| 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/cras_audio_client.h" | 5 #include "chromeos/dbus/cras_audio_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "dbus/bus.h" | 8 #include "dbus/bus.h" |
| 9 #include "dbus/message.h" | 9 #include "dbus/message.h" |
| 10 #include "dbus/object_path.h" | 10 #include "dbus/object_path.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 base::WeakPtrFactory<CrasAudioClientImpl> weak_ptr_factory_; | 286 base::WeakPtrFactory<CrasAudioClientImpl> weak_ptr_factory_; |
| 287 | 287 |
| 288 DISALLOW_COPY_AND_ASSIGN(CrasAudioClientImpl); | 288 DISALLOW_COPY_AND_ASSIGN(CrasAudioClientImpl); |
| 289 }; | 289 }; |
| 290 | 290 |
| 291 // The CrasAudioClient implementation used on Linux desktop, | 291 // The CrasAudioClient implementation used on Linux desktop, |
| 292 // which does nothing. | 292 // which does nothing. |
| 293 class CrasAudioClientStubImpl : public CrasAudioClient { | 293 class CrasAudioClientStubImpl : public CrasAudioClient { |
| 294 public: | 294 public: |
| 295 CrasAudioClientStubImpl() { | 295 CrasAudioClientStubImpl() { |
| 296 LOG(ERROR) << "CrasAudioClientStubImpl is created"; | 296 VLOG(1) << "CrasAudioClientStubImpl created"; |
| 297 } | 297 } |
| 298 ~CrasAudioClientStubImpl() {} | 298 ~CrasAudioClientStubImpl() {} |
| 299 | 299 |
| 300 // CrasAudioClient overrides: | 300 // CrasAudioClient overrides: |
| 301 // TODO(jennyz): Implement the observers and callbacks in the stub for UI | 301 // TODO(jennyz): Implement the observers and callbacks in the stub for UI |
| 302 // testing. | 302 // testing. |
| 303 virtual void AddObserver(Observer* observer) OVERRIDE {} | 303 virtual void AddObserver(Observer* observer) OVERRIDE {} |
| 304 virtual void RemoveObserver(Observer* observer) OVERRIDE {} | 304 virtual void RemoveObserver(Observer* observer) OVERRIDE {} |
| 305 virtual bool HasObserver(Observer* observer) OVERRIDE { return false; } | 305 virtual bool HasObserver(Observer* observer) OVERRIDE { return false; } |
| 306 virtual void GetVolumeState(const GetVolumeStateCallback& callback) OVERRIDE { | 306 virtual void GetVolumeState(const GetVolumeStateCallback& callback) OVERRIDE { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 DBusClientImplementationType type, | 351 DBusClientImplementationType type, |
| 352 dbus::Bus* bus) { | 352 dbus::Bus* bus) { |
| 353 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) { | 353 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) { |
| 354 return new CrasAudioClientImpl(bus); | 354 return new CrasAudioClientImpl(bus); |
| 355 } | 355 } |
| 356 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); | 356 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); |
| 357 return new CrasAudioClientStubImpl(); | 357 return new CrasAudioClientStubImpl(); |
| 358 } | 358 } |
| 359 | 359 |
| 360 } // namespace chromeos | 360 } // namespace chromeos |
| OLD | NEW |