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

Unified Diff: chrome/browser/device_orientation/provider.cc

Issue 2858049: Chromium plumbing for Device Orientation. (Closed)
Patch Set: Fixes after try bot runs Created 10 years, 4 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: chrome/browser/device_orientation/provider.cc
diff --git a/chrome/browser/device_orientation/provider.cc b/chrome/browser/device_orientation/provider.cc
new file mode 100644
index 0000000000000000000000000000000000000000..16b24b388ab0c77d7332b954d7dd3f1694762b84
--- /dev/null
+++ b/chrome/browser/device_orientation/provider.cc
@@ -0,0 +1,24 @@
+// Copyright (c) 2010 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 "chrome/browser/device_orientation/provider.h"
+
+namespace device_orientation {
+
+Provider* Provider::GetInstance() {
+ if (!instance_)
+ // TODO(hans) This is not finished. We will create an instance of the real
+ // Provider implementation once it is implemented.
+ instance_ = new Provider();
+ return instance_;
+}
+
+void Provider::SetInstanceForTests(Provider* provider) {
+ DCHECK(!instance_);
+ instance_ = provider;
+}
+
+Provider* Provider::instance_ = NULL;
+
+} // namespace device_orientation
« no previous file with comments | « chrome/browser/device_orientation/provider.h ('k') | chrome/browser/renderer_host/resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698