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

Unified Diff: content/browser/device_sensors/sensor_manager_android.h

Issue 2410123002: Remove content::BrowserThread knowledge from Device Sensors (Closed)
Patch Set: Rebase, avoid object creation on startup Created 4 years, 2 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/device_sensors/sensor_manager_android.h
diff --git a/content/browser/device_sensors/sensor_manager_android.h b/content/browser/device_sensors/sensor_manager_android.h
index 6a3e45da1c317295c8b97ac5241e77fe270eeac2..d4605ac2b877e0fc8d1f5dd64a80afb3723ee7e1 100644
--- a/content/browser/device_sensors/sensor_manager_android.h
+++ b/content/browser/device_sensors/sensor_manager_android.h
@@ -9,6 +9,8 @@
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/sequenced_task_runner.h"
#include "base/synchronization/lock.h"
#include "content/browser/device_sensors/device_sensors_consts.h"
#include "content/common/content_export.h"
@@ -82,7 +84,8 @@ class CONTENT_EXPORT SensorManagerAndroid {
DeviceOrientationHardwareBuffer* buffer);
void StopFetchingDeviceOrientationAbsoluteData();
- void Shutdown();
+ void SetUITaskRunner(scoped_refptr<base::SequencedTaskRunner> ui_task_runner);
+ void ShutDownOnUIThread();
// A Java counterpart will be generated for this enum.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.content.browser
@@ -160,6 +163,8 @@ class CONTENT_EXPORT SensorManagerAndroid {
base::Lock orientation_buffer_lock_;
base::Lock orientation_absolute_buffer_lock_;
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
+
bool is_shutdown_;
DISALLOW_COPY_AND_ASSIGN(SensorManagerAndroid);
« no previous file with comments | « content/browser/device_sensors/device_sensor_service.cc ('k') | content/browser/device_sensors/sensor_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698