Chromium Code Reviews| 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_ |