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

Unified Diff: content/public/browser/sensor_manager_delegate.cc

Issue 680383007: DeviceOrientation API on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove implementation details from content/public/browser Created 6 years, 1 month 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/public/browser/sensor_manager_delegate.cc
diff --git a/content/public/browser/sensor_manager_delegate.cc b/content/public/browser/sensor_manager_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cb3001ea76ed6b851a1769a23d6092ac8f3bb3f8
--- /dev/null
+++ b/content/public/browser/sensor_manager_delegate.cc
@@ -0,0 +1,29 @@
+// Copyright 2014 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.
+
+#include "content/public/browser/sensor_manager_delegate.h"
+
+namespace content {
+
+SensorManagerDelegate* SensorManagerDelegate::delegate_ = nullptr;
+
+SensorManagerDelegate::SensorManagerDelegate() {
+}
+
+SensorManagerDelegate::~SensorManagerDelegate() {
+}
+
+SensorManagerDelegate* SensorManagerDelegate::GetInstance() {
+ return delegate_;
+}
+
+bool SensorManagerDelegate::HasInstance() {
+ return delegate_ != nullptr;
+}
+
+void SensorManagerDelegate::SetDelegate(SensorManagerDelegate* delegate) {
+ delegate_ = delegate;
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698