Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 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. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_CHROMEOS_SENSORS_SOURCE_CHROMEOS_H_ | |
| 6 #define CONTENT_BROWSER_CHROMEOS_SENSORS_SOURCE_CHROMEOS_H_ | |
| 7 | |
| 8 #include "base/memory/ref_counted.h" | |
| 9 | |
| 10 #include <string> | |
| 11 | |
| 12 namespace dbus { | |
| 13 class Bus; | |
| 14 class ObjectProxy; | |
| 15 class Signal; | |
| 16 } // namespace | |
| 17 | |
| 18 namespace sensors { | |
| 19 | |
| 20 // Creates and manages a dbus signal receiver for device orientation changes, | |
| 21 // and eventually receives data for other motion-related sensors. | |
| 22 class SensorsSourceChromeos | |
| 23 : public base::RefCountedThreadSafe<SensorsSourceChromeos> { | |
| 24 public: | |
| 25 SensorsSourceChromeos(); | |
| 26 | |
| 27 bool Init(); | |
|
satorux1
2011/09/12 19:46:38
Function comment is missing. This may be obvious b
cwolfe
2011/09/12 21:17:36
Done.
| |
| 28 void Stop(); | |
| 29 | |
| 30 private: | |
| 31 friend class base::RefCountedThreadSafe<SensorsSourceChromeos>; | |
| 32 virtual ~SensorsSourceChromeos(); | |
| 33 | |
| 34 void OrientationChangedReceived(dbus::Signal* signal); | |
| 35 void OrientationChangedConnected(const std::string& iface_name, | |
|
satorux1
2011/09/12 19:46:38
iface ->interface? We generally eschew abbreviatio
cwolfe
2011/09/12 21:17:36
Done.
| |
| 36 const std::string& signal_name, | |
| 37 bool success); | |
|
satorux1
2011/09/12 19:46:38
Ditto. Function comments are missing. One-line com
cwolfe
2011/09/12 21:17:36
Done.
| |
| 38 | |
| 39 scoped_refptr<dbus::Bus> bus_; | |
| 40 dbus::ObjectProxy* sensors_proxy_; | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(SensorsSourceChromeos); | |
| 43 }; | |
| 44 | |
| 45 } // namespace sensors | |
| 46 | |
| 47 #endif // CONTENT_BROWSER_CHROMEOS_SENSORS_SOURCE_CHROMEOS_H_ | |
| OLD | NEW |