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

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

Issue 1008613002: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[a-d]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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_orientation_message_filter.h" 5 #include "content/browser/device_sensors/device_orientation_message_filter.h"
6 6
7 #include "content/browser/device_sensors/device_inertial_sensor_service.h" 7 #include "content/browser/device_sensors/device_inertial_sensor_service.h"
8 #include "content/common/device_sensors/device_orientation_messages.h" 8 #include "content/common/device_sensors/device_orientation_messages.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 DeviceOrientationMessageFilter::DeviceOrientationMessageFilter() 12 DeviceOrientationMessageFilter::DeviceOrientationMessageFilter()
13 : BrowserMessageFilter(DeviceOrientationMsgStart), 13 : BrowserMessageFilter(DeviceOrientationMsgStart),
14 is_started_(false) { 14 is_started_(false) {
15 } 15 }
16 16
17 DeviceOrientationMessageFilter::~DeviceOrientationMessageFilter() { 17 DeviceOrientationMessageFilter::~DeviceOrientationMessageFilter() {
18 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 18 DCHECK_CURRENTLY_ON(BrowserThread::IO);
19 if (is_started_) 19 if (is_started_)
20 DeviceInertialSensorService::GetInstance()->RemoveConsumer( 20 DeviceInertialSensorService::GetInstance()->RemoveConsumer(
21 CONSUMER_TYPE_ORIENTATION); 21 CONSUMER_TYPE_ORIENTATION);
22 } 22 }
23 23
24 bool DeviceOrientationMessageFilter::OnMessageReceived( 24 bool DeviceOrientationMessageFilter::OnMessageReceived(
25 const IPC::Message& message) { 25 const IPC::Message& message) {
26 bool handled = true; 26 bool handled = true;
27 IPC_BEGIN_MESSAGE_MAP(DeviceOrientationMessageFilter, message) 27 IPC_BEGIN_MESSAGE_MAP(DeviceOrientationMessageFilter, message)
28 IPC_MESSAGE_HANDLER(DeviceOrientationHostMsg_StartPolling, 28 IPC_MESSAGE_HANDLER(DeviceOrientationHostMsg_StartPolling,
(...skipping 26 matching lines...) Expand all
55 55
56 void DeviceOrientationMessageFilter::DidStartDeviceOrientationPolling() { 56 void DeviceOrientationMessageFilter::DidStartDeviceOrientationPolling() {
57 Send(new DeviceOrientationMsg_DidStartPolling( 57 Send(new DeviceOrientationMsg_DidStartPolling(
58 DeviceInertialSensorService::GetInstance()-> 58 DeviceInertialSensorService::GetInstance()->
59 GetSharedMemoryHandleForProcess( 59 GetSharedMemoryHandleForProcess(
60 CONSUMER_TYPE_ORIENTATION, 60 CONSUMER_TYPE_ORIENTATION,
61 PeerHandle()))); 61 PeerHandle())));
62 } 62 }
63 63
64 } // namespace content 64 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/device_sensors/device_motion_message_filter.cc ('k') | content/browser/devtools/devtools_agent_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698