Chromium Code Reviews| Index: content/browser/sensors/sensors_source_chromeos.h |
| diff --git a/content/browser/sensors/sensors_source_chromeos.h b/content/browser/sensors/sensors_source_chromeos.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0218d721bcd2c637368e70d283d4f245ae260754 |
| --- /dev/null |
| +++ b/content/browser/sensors/sensors_source_chromeos.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_CHROMEOS_SENSORS_SOURCE_CHROMEOS_H_ |
| +#define CONTENT_BROWSER_CHROMEOS_SENSORS_SOURCE_CHROMEOS_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| + |
| +#include <string> |
| + |
| +namespace dbus { |
| +class Bus; |
| +class ObjectProxy; |
| +class Signal; |
| +} // namespace |
| + |
| +namespace sensors { |
| + |
| +// Creates and manages a dbus signal receiver for device orientation changes, |
| +// and eventually receives data for other motion-related sensors. |
| +class SensorsSourceChromeos |
| + : public base::RefCountedThreadSafe<SensorsSourceChromeos> { |
| + public: |
| + SensorsSourceChromeos(); |
| + |
| + 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.
|
| + void Stop(); |
| + |
| + private: |
| + friend class base::RefCountedThreadSafe<SensorsSourceChromeos>; |
| + virtual ~SensorsSourceChromeos(); |
| + |
| + void OrientationChangedReceived(dbus::Signal* signal); |
| + 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.
|
| + const std::string& signal_name, |
| + 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.
|
| + |
| + scoped_refptr<dbus::Bus> bus_; |
| + dbus::ObjectProxy* sensors_proxy_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SensorsSourceChromeos); |
| +}; |
| + |
| +} // namespace sensors |
| + |
| +#endif // CONTENT_BROWSER_CHROMEOS_SENSORS_SOURCE_CHROMEOS_H_ |