Add some instrumentation for jank in URLRequest::Start.
[chromium-blink-merge.git] / chromeos / dbus / fake_bluetooth_media_endpoint_service_provider.h
blob5efe14ffe0ed2d08d6a9c4fd21da5e299125c2bc
1 // Copyright 2014 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 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
8 #include <vector>
10 #include "base/logging.h"
11 #include "chromeos/chromeos_export.h"
12 #include "chromeos/dbus/bluetooth_media_endpoint_service_provider.h"
13 #include "dbus/object_path.h"
14 #include "testing/gtest/include/gtest/gtest_prod.h"
16 namespace chromeos {
18 // FakeBluetoothMediaEndpointServiceProvider simulates the behavior of a local
19 // Bluetooth Media Endpoint object.
20 class CHROMEOS_EXPORT FakeBluetoothMediaEndpointServiceProvider
21 : public BluetoothMediaEndpointServiceProvider {
22 public:
23 FakeBluetoothMediaEndpointServiceProvider(const dbus::ObjectPath& object_path,
24 Delegate* delegate);
25 ~FakeBluetoothMediaEndpointServiceProvider() override;
27 // Each of these calls the equivalent BluetoothMediaEnpointServiceProvider::
28 // Delegate method on the object passed on construction.
29 void SetConfiguration(const dbus::ObjectPath& transport_path,
30 const Delegate::TransportProperties& properties);
31 void SelectConfiguration(
32 const std::vector<uint8_t>& capabilities,
33 const Delegate::SelectConfigurationCallback& callback);
34 void ClearConfiguration(const dbus::ObjectPath& transport_path);
35 void Released();
37 // Gets the path of the media endpoint object.
38 const dbus::ObjectPath& object_path() const { return object_path_; }
40 private:
41 // Indicates whether the endpoint object is visible or not.
42 bool visible_;
44 // The path of the media endpoint object.
45 dbus::ObjectPath object_path_;
47 // All incoming method calls are passed to |delegate_|. |callback| passed to
48 // |delegate_| will generate the response for those methods which have
49 // non-void return.
50 Delegate* delegate_;
52 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothMediaEndpointServiceProvider);
55 } // namespace chromeos
57 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_