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

Side by Side Diff: content/browser/device_sensors/data_fetcher_shared_memory.h

Issue 2410123002: Remove content::BrowserThread knowledge from Device Sensors (Closed)
Patch Set: Rebase, avoid object creation on startup Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ 5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_
6 #define CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ 6 #define CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/device_sensors/data_fetcher_shared_memory_base.h" 10 #include "content/browser/device_sensors/data_fetcher_shared_memory_base.h"
(...skipping 20 matching lines...) Expand all
31 #endif 31 #endif
32 32
33 class CONTENT_EXPORT DataFetcherSharedMemory 33 class CONTENT_EXPORT DataFetcherSharedMemory
34 : public DataFetcherSharedMemoryBase { 34 : public DataFetcherSharedMemoryBase {
35 35
36 public: 36 public:
37 DataFetcherSharedMemory(); 37 DataFetcherSharedMemory();
38 ~DataFetcherSharedMemory() override; 38 ~DataFetcherSharedMemory() override;
39 39
40 #if defined(OS_ANDROID) 40 #if defined(OS_ANDROID)
41 void Shutdown() override; 41 void ShutDownOnUIThread() override;
42 #endif 42 #endif
43 43
44 private: 44 private:
45 bool Start(ConsumerType consumer_type, void* buffer) override; 45 bool Start(ConsumerType consumer_type, void* buffer) override;
46 bool Stop(ConsumerType consumer_type) override; 46 bool Stop(ConsumerType consumer_type) override;
47 47
48 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) 48 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
49 #if !defined(OS_CHROMEOS) 49 #if !defined(OS_CHROMEOS)
50 DeviceMotionHardwareBuffer* motion_buffer_ = nullptr; 50 DeviceMotionHardwareBuffer* motion_buffer_ = nullptr;
51 DeviceOrientationHardwareBuffer* orientation_buffer_ = nullptr; 51 DeviceOrientationHardwareBuffer* orientation_buffer_ = nullptr;
(...skipping 29 matching lines...) Expand all
81 base::win::ScopedComPtr<ISensor> sensor_gyrometer_; 81 base::win::ScopedComPtr<ISensor> sensor_gyrometer_;
82 base::win::ScopedComPtr<ISensor> sensor_light_; 82 base::win::ScopedComPtr<ISensor> sensor_light_;
83 #endif 83 #endif
84 84
85 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory); 85 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory);
86 }; 86 };
87 87
88 } // namespace content 88 } // namespace content
89 89
90 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ 90 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/device_sensors/data_fetcher_shared_memory_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698