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

Unified Diff: services/device/device_service.cc

Issue 2755363002: [DeviceService] Port VibrationManager to be hosted in Device Service (Closed)
Patch Set: Rebase only Created 3 years, 9 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
« no previous file with comments | « services/device/device_service.h ('k') | services/device/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/device/device_service.cc
diff --git a/services/device/device_service.cc b/services/device/device_service.cc
index 38f0aa2d5ca83750d561f384f3cc62070d477efc..4da7eb07ce6724470bef8ed14ca3829b5114beeb 100644
--- a/services/device/device_service.cc
+++ b/services/device/device_service.cc
@@ -26,6 +26,8 @@
#include "jni/InterfaceRegistrar_jni.h"
#include "services/device/android/register_jni.h"
#include "services/device/screen_orientation/screen_orientation_listener_android.h"
+#else
+#include "device/vibration/vibration_manager_impl.h"
#endif
namespace device {
@@ -77,8 +79,12 @@ bool DeviceService::OnConnect(const service_manager::ServiceInfo& remote_info,
#if defined(OS_ANDROID)
registry->AddInterface(
GetJavaInterfaceProvider()->CreateInterfaceFactory<BatteryMonitor>());
+ registry->AddInterface(
+ GetJavaInterfaceProvider()
+ ->CreateInterfaceFactory<mojom::VibrationManager>());
#else
registry->AddInterface<BatteryMonitor>(this);
+ registry->AddInterface<mojom::VibrationManager>(this);
#endif
return true;
@@ -89,6 +95,11 @@ void DeviceService::Create(const service_manager::Identity& remote_identity,
BatteryMonitorRequest request) {
device::BatteryMonitorImpl::Create(std::move(request));
}
+
+void DeviceService::Create(const service_manager::Identity& remote_identity,
+ mojom::VibrationManagerRequest request) {
+ VibrationManagerImpl::Create(std::move(request));
+}
#endif
void DeviceService::Create(const service_manager::Identity& remote_identity,
« no previous file with comments | « services/device/device_service.h ('k') | services/device/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698