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

Side by Side Diff: chromeos/dbus/fake_bluetooth_input_client.h

Issue 628883002: replace OVERRIDE and FINAL with override and final in chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_INPUT_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_INPUT_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_INPUT_CLIENT_H_ 6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_INPUT_CLIENT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "chromeos/chromeos_export.h" 10 #include "chromeos/chromeos_export.h"
11 #include "chromeos/dbus/bluetooth_input_client.h" 11 #include "chromeos/dbus/bluetooth_input_client.h"
12 #include "dbus/object_path.h" 12 #include "dbus/object_path.h"
13 #include "dbus/property.h" 13 #include "dbus/property.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 // FakeBluetoothInputClient simulates the behavior of the Bluetooth Daemon 17 // FakeBluetoothInputClient simulates the behavior of the Bluetooth Daemon
18 // input device objects and is used both in test cases in place of a mock and on 18 // input device objects and is used both in test cases in place of a mock and on
19 // the Linux desktop. 19 // the Linux desktop.
20 class CHROMEOS_EXPORT FakeBluetoothInputClient 20 class CHROMEOS_EXPORT FakeBluetoothInputClient
21 : public BluetoothInputClient { 21 : public BluetoothInputClient {
22 public: 22 public:
23 struct Properties : public BluetoothInputClient::Properties { 23 struct Properties : public BluetoothInputClient::Properties {
24 explicit Properties(const PropertyChangedCallback & callback); 24 explicit Properties(const PropertyChangedCallback & callback);
25 virtual ~Properties(); 25 virtual ~Properties();
26 26
27 // dbus::PropertySet override 27 // dbus::PropertySet override
28 virtual void Get(dbus::PropertyBase* property, 28 virtual void Get(dbus::PropertyBase* property,
29 dbus::PropertySet::GetCallback callback) OVERRIDE; 29 dbus::PropertySet::GetCallback callback) override;
30 virtual void GetAll() OVERRIDE; 30 virtual void GetAll() override;
31 virtual void Set(dbus::PropertyBase* property, 31 virtual void Set(dbus::PropertyBase* property,
32 dbus::PropertySet::SetCallback callback) OVERRIDE; 32 dbus::PropertySet::SetCallback callback) override;
33 }; 33 };
34 34
35 FakeBluetoothInputClient(); 35 FakeBluetoothInputClient();
36 virtual ~FakeBluetoothInputClient(); 36 virtual ~FakeBluetoothInputClient();
37 37
38 // BluetoothInputClient overrides 38 // BluetoothInputClient overrides
39 virtual void Init(dbus::Bus* bus) OVERRIDE; 39 virtual void Init(dbus::Bus* bus) override;
40 virtual void AddObserver(Observer* observer) OVERRIDE; 40 virtual void AddObserver(Observer* observer) override;
41 virtual void RemoveObserver(Observer* observer) OVERRIDE; 41 virtual void RemoveObserver(Observer* observer) override;
42 virtual Properties* GetProperties(const dbus::ObjectPath& object_path) 42 virtual Properties* GetProperties(const dbus::ObjectPath& object_path)
43 OVERRIDE; 43 override;
44 44
45 // Simulate device addition/removal 45 // Simulate device addition/removal
46 void AddInputDevice(const dbus::ObjectPath& object_path); 46 void AddInputDevice(const dbus::ObjectPath& object_path);
47 void RemoveInputDevice(const dbus::ObjectPath& object_path); 47 void RemoveInputDevice(const dbus::ObjectPath& object_path);
48 48
49 private: 49 private:
50 // Property callback passed when we create Properties* structures. 50 // Property callback passed when we create Properties* structures.
51 void OnPropertyChanged(const dbus::ObjectPath& object_path, 51 void OnPropertyChanged(const dbus::ObjectPath& object_path,
52 const std::string& property_name); 52 const std::string& property_name);
53 53
54 // Static properties we return. 54 // Static properties we return.
55 typedef std::map<const dbus::ObjectPath, Properties *> PropertiesMap; 55 typedef std::map<const dbus::ObjectPath, Properties *> PropertiesMap;
56 PropertiesMap properties_map_; 56 PropertiesMap properties_map_;
57 57
58 // List of observers interested in event notifications from us. 58 // List of observers interested in event notifications from us.
59 ObserverList<Observer> observers_; 59 ObserverList<Observer> observers_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothInputClient); 61 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothInputClient);
62 }; 62 };
63 63
64 } // namespace chromeos 64 } // namespace chromeos
65 65
66 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_INPUT_CLIENT_H_ 66 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_INPUT_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_bluetooth_gatt_service_client.h ('k') | chromeos/dbus/fake_bluetooth_profile_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698