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

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

Issue 1416123002: Absolute Device Orientation API: blink implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/device_inertial_sensor_service.h" 5 #include "content/browser/device_sensors/device_inertial_sensor_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "content/browser/device_sensors/data_fetcher_shared_memory.h" 10 #include "content/browser/device_sensors/data_fetcher_shared_memory.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 DeviceInertialSensorService::DeviceInertialSensorService() 14 DeviceInertialSensorService::DeviceInertialSensorService()
15 : num_light_readers_(0), 15 : num_light_readers_(0),
16 num_motion_readers_(0), 16 num_motion_readers_(0),
17 num_orientation_readers_(0), 17 num_orientation_readers_(0),
18 num_orientation_absolute_readers_(0),
18 is_shutdown_(false) { 19 is_shutdown_(false) {
19 } 20 }
20 21
21 DeviceInertialSensorService::~DeviceInertialSensorService() { 22 DeviceInertialSensorService::~DeviceInertialSensorService() {
22 } 23 }
23 24
24 DeviceInertialSensorService* DeviceInertialSensorService::GetInstance() { 25 DeviceInertialSensorService* DeviceInertialSensorService::GetInstance() {
25 return base::Singleton< 26 return base::Singleton<
26 DeviceInertialSensorService, 27 DeviceInertialSensorService,
27 base::LeakySingletonTraits<DeviceInertialSensorService>>::get(); 28 base::LeakySingletonTraits<DeviceInertialSensorService>>::get();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 109 }
109 110
110 void DeviceInertialSensorService::SetDataFetcherForTesting( 111 void DeviceInertialSensorService::SetDataFetcherForTesting(
111 DataFetcherSharedMemory* test_data_fetcher) { 112 DataFetcherSharedMemory* test_data_fetcher) {
112 if (data_fetcher_) 113 if (data_fetcher_)
113 data_fetcher_->Shutdown(); 114 data_fetcher_->Shutdown();
114 data_fetcher_.reset(test_data_fetcher); 115 data_fetcher_.reset(test_data_fetcher);
115 } 116 }
116 117
117 } // namespace content 118 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698