OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ | 5 #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ |
6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ | 6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/shared_memory.h" | 11 #include "base/memory/shared_memory.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
14 #include "content/public/renderer/platform_event_observer.h" | 14 #include "content/public/renderer/platform_event_observer.h" |
15 #include "content/renderer/render_thread_impl.h" | 15 #include "content/renderer/render_thread_impl.h" |
16 #include "mojo/public/cpp/system/platform_handle.h" | 16 #include "mojo/public/cpp/system/platform_handle.h" |
17 #include "services/shell/public/cpp/interface_provider.h" | 17 #include "services/service_manager/public/cpp/interface_provider.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 template <typename Base, typename MojoInterface> | 21 template <typename Base, typename MojoInterface> |
22 class CONTENT_EXPORT DeviceSensorMojoClientMixin : public Base { | 22 class CONTENT_EXPORT DeviceSensorMojoClientMixin : public Base { |
23 public: | 23 public: |
24 template <typename... Args> | 24 template <typename... Args> |
25 explicit DeviceSensorMojoClientMixin(Args&&... args) | 25 explicit DeviceSensorMojoClientMixin(Args&&... args) |
26 : Base(std::forward<Args>(args)...) { | 26 : Base(std::forward<Args>(args)...) { |
27 mojo::InterfaceRequest<MojoInterface> request = | 27 mojo::InterfaceRequest<MojoInterface> request = |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 int pump_delay_microseconds_; | 142 int pump_delay_microseconds_; |
143 PumpState state_; | 143 PumpState state_; |
144 base::RepeatingTimer timer_; | 144 base::RepeatingTimer timer_; |
145 | 145 |
146 DISALLOW_COPY_AND_ASSIGN(DeviceSensorEventPump); | 146 DISALLOW_COPY_AND_ASSIGN(DeviceSensorEventPump); |
147 }; | 147 }; |
148 | 148 |
149 } // namespace content | 149 } // namespace content |
150 | 150 |
151 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ | 151 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_SENSOR_EVENT_PUMP_H_ |
OLD | NEW |