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

Unified Diff: content/browser/sensors/sensors_source_chromeos.h

Issue 7862020: chromeos: Add operations to monitor the screen orientation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Juggle some code to content and general cleanup. Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698