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

Side by Side Diff: content/browser/device_sensors/data_fetcher_shared_memory_android.cc

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 #include "content/browser/device_sensors/data_fetcher_shared_memory.h" 5 #include "content/browser/device_sensors/data_fetcher_shared_memory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/device_sensors/sensor_manager_android.h" 8 #include "content/browser/device_sensors/sensor_manager_android.h"
9 #include "device/sensors/public/cpp/device_light_hardware_buffer.h" 9 #include "device/sensors/public/cpp/device_light_hardware_buffer.h"
10 #include "device/sensors/public/cpp/device_motion_hardware_buffer.h" 10 #include "device/sensors/public/cpp/device_motion_hardware_buffer.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return true; 59 return true;
60 case CONSUMER_TYPE_LIGHT: 60 case CONSUMER_TYPE_LIGHT:
61 SensorManagerAndroid::GetInstance()->StopFetchingDeviceLightData(); 61 SensorManagerAndroid::GetInstance()->StopFetchingDeviceLightData();
62 return true; 62 return true;
63 default: 63 default:
64 NOTREACHED(); 64 NOTREACHED();
65 } 65 }
66 return false; 66 return false;
67 } 67 }
68 68
69 void DataFetcherSharedMemory::Shutdown() { 69 void DataFetcherSharedMemory::ShutDownOnUIThread() {
70 DataFetcherSharedMemoryBase::Shutdown(); 70 DataFetcherSharedMemoryBase::ShutDownOnUIThread();
71 SensorManagerAndroid::GetInstance()->Shutdown(); 71 SensorManagerAndroid::GetInstance()->ShutDownOnUIThread();
72 } 72 }
73 73
74 } // namespace content 74 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698