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

Side by Side Diff: Source/modules/device_orientation/DeviceMotionData.cpp

Issue 464353002: Cleanup blink:: prefix usage in Source/core/modules/[battery/*.cpp to indexeddb/*.cpp] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 4 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 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 PassRefPtrWillBeRawPtr<DeviceMotionData> DeviceMotionData::create( 70 PassRefPtrWillBeRawPtr<DeviceMotionData> DeviceMotionData::create(
71 PassRefPtrWillBeRawPtr<Acceleration> acceleration, 71 PassRefPtrWillBeRawPtr<Acceleration> acceleration,
72 PassRefPtrWillBeRawPtr<Acceleration> accelerationIncludingGravity, 72 PassRefPtrWillBeRawPtr<Acceleration> accelerationIncludingGravity,
73 PassRefPtrWillBeRawPtr<RotationRate> rotationRate, 73 PassRefPtrWillBeRawPtr<RotationRate> rotationRate,
74 bool canProvideInterval, 74 bool canProvideInterval,
75 double interval) 75 double interval)
76 { 76 {
77 return adoptRefWillBeNoop(new DeviceMotionData(acceleration, accelerationInc ludingGravity, rotationRate, canProvideInterval, interval)); 77 return adoptRefWillBeNoop(new DeviceMotionData(acceleration, accelerationInc ludingGravity, rotationRate, canProvideInterval, interval));
78 } 78 }
79 79
80 PassRefPtrWillBeRawPtr<DeviceMotionData> DeviceMotionData::create(const blink::W ebDeviceMotionData& data) 80 PassRefPtrWillBeRawPtr<DeviceMotionData> DeviceMotionData::create(const WebDevic eMotionData& data)
81 { 81 {
82 return DeviceMotionData::create( 82 return DeviceMotionData::create(
83 DeviceMotionData::Acceleration::create( 83 DeviceMotionData::Acceleration::create(
84 data.hasAccelerationX, data.accelerationX, 84 data.hasAccelerationX, data.accelerationX,
85 data.hasAccelerationY, data.accelerationY, 85 data.hasAccelerationY, data.accelerationY,
86 data.hasAccelerationZ, data.accelerationZ), 86 data.hasAccelerationZ, data.accelerationZ),
87 DeviceMotionData::Acceleration::create( 87 DeviceMotionData::Acceleration::create(
88 data.hasAccelerationIncludingGravityX, data.accelerationIncludingGra vityX, 88 data.hasAccelerationIncludingGravityX, data.accelerationIncludingGra vityX,
89 data.hasAccelerationIncludingGravityY, data.accelerationIncludingGra vityY, 89 data.hasAccelerationIncludingGravityY, data.accelerationIncludingGra vityY,
90 data.hasAccelerationIncludingGravityZ, data.accelerationIncludingGra vityZ), 90 data.hasAccelerationIncludingGravityZ, data.accelerationIncludingGra vityZ),
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 bool DeviceMotionData::canProvideEventData() const 125 bool DeviceMotionData::canProvideEventData() const
126 { 126 {
127 const bool hasAcceleration = m_acceleration && (m_acceleration->canProvideX( ) || m_acceleration->canProvideY() || m_acceleration->canProvideZ()); 127 const bool hasAcceleration = m_acceleration && (m_acceleration->canProvideX( ) || m_acceleration->canProvideY() || m_acceleration->canProvideZ());
128 const bool hasAccelerationIncludingGravity = m_accelerationIncludingGravity && (m_accelerationIncludingGravity->canProvideX() || m_accelerationIncludingGrav ity->canProvideY() || m_accelerationIncludingGravity->canProvideZ()); 128 const bool hasAccelerationIncludingGravity = m_accelerationIncludingGravity && (m_accelerationIncludingGravity->canProvideX() || m_accelerationIncludingGrav ity->canProvideY() || m_accelerationIncludingGravity->canProvideZ());
129 const bool hasRotationRate = m_rotationRate && (m_rotationRate->canProvideAl pha() || m_rotationRate->canProvideBeta() || m_rotationRate->canProvideGamma()); 129 const bool hasRotationRate = m_rotationRate && (m_rotationRate->canProvideAl pha() || m_rotationRate->canProvideBeta() || m_rotationRate->canProvideGamma());
130 130
131 return hasAcceleration || hasAccelerationIncludingGravity || hasRotationRate ; 131 return hasAcceleration || hasAccelerationIncludingGravity || hasRotationRate ;
132 } 132 }
133 133
134 } // namespace blink 134 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/device_light/DeviceLightDispatcher.cpp ('k') | Source/modules/device_orientation/DeviceMotionDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698