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

Unified Diff: content/renderer/device_sensors/device_sensor_event_pump.h

Issue 2692993006: Port device_sensors to be hosted in Device Service (Closed)
Patch Set: code rebase Created 3 years, 10 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 | « content/renderer/BUILD.gn ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/device_sensors/device_sensor_event_pump.h
diff --git a/content/renderer/device_sensors/device_sensor_event_pump.h b/content/renderer/device_sensors/device_sensor_event_pump.h
index b5859079755c0a8c21a5e60fedbf9f17b722af7d..c83239eec501b21b6bca1c003dc911b6dbdfa671 100644
--- a/content/renderer/device_sensors/device_sensor_event_pump.h
+++ b/content/renderer/device_sensors/device_sensor_event_pump.h
@@ -11,10 +11,12 @@
#include "base/memory/shared_memory.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
+#include "content/public/common/service_manager_connection.h"
#include "content/public/renderer/platform_event_observer.h"
#include "content/renderer/render_thread_impl.h"
#include "mojo/public/cpp/system/platform_handle.h"
-#include "services/service_manager/public/cpp/interface_provider.h"
+#include "services/device/public/interfaces/constants.mojom.h"
+#include "services/service_manager/public/cpp/connector.h"
namespace content {
@@ -24,7 +26,6 @@ class CONTENT_EXPORT DeviceSensorMojoClientMixin : public Base {
template <typename... Args>
explicit DeviceSensorMojoClientMixin(Args&&... args)
: Base(std::forward<Args>(args)...) {
- mojo::InterfaceRequest<MojoInterface> request(&mojo_interface_);
blundell 2017/02/22 16:30:24 The problem is here. You're now not binding |mojo_
// When running layout tests, those observers should not listen to the
// actual hardware changes. In order to make that happen, don't connect
@@ -34,8 +35,10 @@ class CONTENT_EXPORT DeviceSensorMojoClientMixin : public Base {
// is ready and the layout tests are converted to use that for mocking.
if (RenderThreadImpl::current() &&
!RenderThreadImpl::current()->layout_test_mode()) {
- RenderThread::Get()->GetRemoteInterfaces()->GetInterface(
- std::move(request));
+ RenderThreadImpl::current()
+ ->GetServiceManagerConnection()
+ ->GetConnector()
+ ->BindInterface(device::mojom::kServiceName, &mojo_interface_);
}
}
« no previous file with comments | « content/renderer/BUILD.gn ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698