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

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

Issue 604483003: Increase device orientation event frequency to 60 Hz. Change constants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc » ('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/data_fetcher_shared_memory_base.h" 5 #include "content/browser/device_sensors/data_fetcher_shared_memory_base.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/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void DataFetcherSharedMemoryBase::Fetch(unsigned consumer_bitmask) { 200 void DataFetcherSharedMemoryBase::Fetch(unsigned consumer_bitmask) {
201 NOTIMPLEMENTED(); 201 NOTIMPLEMENTED();
202 } 202 }
203 203
204 DataFetcherSharedMemoryBase::FetcherType 204 DataFetcherSharedMemoryBase::FetcherType
205 DataFetcherSharedMemoryBase::GetType() const { 205 DataFetcherSharedMemoryBase::GetType() const {
206 return FETCHER_TYPE_DEFAULT; 206 return FETCHER_TYPE_DEFAULT;
207 } 207 }
208 208
209 base::TimeDelta DataFetcherSharedMemoryBase::GetInterval() const { 209 base::TimeDelta DataFetcherSharedMemoryBase::GetInterval() const {
210 return base::TimeDelta::FromMilliseconds(kInertialSensorIntervalMillis); 210 return base::TimeDelta::FromMicroseconds(kInertialSensorIntervalMicroseconds);
211 } 211 }
212 212
213 base::SharedMemory* DataFetcherSharedMemoryBase::GetSharedMemory( 213 base::SharedMemory* DataFetcherSharedMemoryBase::GetSharedMemory(
214 ConsumerType consumer_type) { 214 ConsumerType consumer_type) {
215 SharedMemoryMap::const_iterator it = shared_memory_map_.find(consumer_type); 215 SharedMemoryMap::const_iterator it = shared_memory_map_.find(consumer_type);
216 if (it != shared_memory_map_.end()) 216 if (it != shared_memory_map_.end())
217 return it->second; 217 return it->second;
218 218
219 size_t buffer_size = GetConsumerSharedMemoryBufferSize(consumer_type); 219 size_t buffer_size = GetConsumerSharedMemoryBufferSize(consumer_type);
220 if (buffer_size == 0) 220 if (buffer_size == 0)
(...skipping 21 matching lines...) Expand all
242 242
243 base::MessageLoop* DataFetcherSharedMemoryBase::GetPollingMessageLoop() const { 243 base::MessageLoop* DataFetcherSharedMemoryBase::GetPollingMessageLoop() const {
244 return polling_thread_ ? polling_thread_->message_loop() : NULL; 244 return polling_thread_ ? polling_thread_->message_loop() : NULL;
245 } 245 }
246 246
247 bool DataFetcherSharedMemoryBase::IsPollingTimerRunningForTesting() const { 247 bool DataFetcherSharedMemoryBase::IsPollingTimerRunningForTesting() const {
248 return polling_thread_ ? polling_thread_->IsTimerRunning() : false; 248 return polling_thread_ ? polling_thread_->IsTimerRunning() : false;
249 } 249 }
250 250
251 } // namespace content 251 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698