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

Unified Diff: content/browser/vibration/vibration_service_factory.h

Issue 16781002: Vibration API: plumbing from Blink to Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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/vibration/vibration_service_factory.h
diff --git a/content/browser/vibration/vibration_service_factory.h b/content/browser/vibration/vibration_service_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..6705d2cc41121c3e160b5098b06edaccf1aa1fea
--- /dev/null
+++ b/content/browser/vibration/vibration_service_factory.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2013 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_VIBRATION_VIBRATION_SERVICE_FACTORY_H_
+#define CONTENT_BROWSER_VIBRATION_VIBRATION_SERVICE_FACTORY_H_
+
+#if defined(OS_ANDROID)
+#include "content/browser/vibration/vibration_service_impl_android.h"
+#else
+#include "content/browser/vibration/vibration_service_impl_empty.h"
Peter Beverloo 2013/06/13 11:27:45 Do we need an empty implementation? Can't we just
Michael van Ouwerkerk 2013/06/18 14:39:23 Done.
+#endif
+
+namespace content {
+
+scoped_ptr<VibrationService> NewVibrationService() {
+#if defined(OS_ANDROID)
+ return scoped_ptr<VibrationService>(new VibrationServiceImplAndroid());
+#else
+ return scoped_ptr<VibrationService>(new VibrationServiceImplEmpty());
+#endif
+}
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_VIBRATION_VIBRATION_SERVICE_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698