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

Side by Side Diff: Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp

Issue 537403002: bindings: Renames from/toInternalPointer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 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 | Annotate | Revision Log
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (!canProvideAlpha && !canProvideBeta && !canProvideGamma) 95 if (!canProvideAlpha && !canProvideBeta && !canProvideGamma)
96 return nullptr; 96 return nullptr;
97 97
98 return DeviceMotionData::RotationRate::create(canProvideAlpha, alpha, canPro videBeta, beta, canProvideGamma, gamma); 98 return DeviceMotionData::RotationRate::create(canProvideAlpha, alpha, canPro videBeta, beta, canProvideGamma, gamma);
99 } 99 }
100 100
101 } // namespace 101 } // namespace
102 102
103 void V8DeviceMotionEvent::initDeviceMotionEventMethodCustom(const v8::FunctionCa llbackInfo<v8::Value>& info) 103 void V8DeviceMotionEvent::initDeviceMotionEventMethodCustom(const v8::FunctionCa llbackInfo<v8::Value>& info)
104 { 104 {
105 DeviceMotionEvent* impl = V8DeviceMotionEvent::toNative(info.Holder()); 105 DeviceMotionEvent* impl = V8DeviceMotionEvent::toImpl(info.Holder());
106 v8::Isolate* isolate = info.GetIsolate(); 106 v8::Isolate* isolate = info.GetIsolate();
107 TOSTRING_VOID(V8StringResource<>, type, info[0]); 107 TOSTRING_VOID(V8StringResource<>, type, info[0]);
108 bool bubbles = info[1]->BooleanValue(); 108 bool bubbles = info[1]->BooleanValue();
109 bool cancelable = info[2]->BooleanValue(); 109 bool cancelable = info[2]->BooleanValue();
110 DeviceMotionData::Acceleration* acceleration = readAccelerationArgument(info [3], isolate); 110 DeviceMotionData::Acceleration* acceleration = readAccelerationArgument(info [3], isolate);
111 DeviceMotionData::Acceleration* accelerationIncludingGravity = readAccelerat ionArgument(info[4], isolate); 111 DeviceMotionData::Acceleration* accelerationIncludingGravity = readAccelerat ionArgument(info[4], isolate);
112 DeviceMotionData::RotationRate* rotationRate = readRotationRateArgument(info [5], isolate); 112 DeviceMotionData::RotationRate* rotationRate = readRotationRateArgument(info [5], isolate);
113 bool intervalProvided = !isUndefinedOrNull(info[6]); 113 bool intervalProvided = !isUndefinedOrNull(info[6]);
114 double interval = info[6]->NumberValue(); 114 double interval = info[6]->NumberValue();
115 DeviceMotionData* deviceMotionData = DeviceMotionData::create(acceleration, accelerationIncludingGravity, rotationRate, intervalProvided, interval); 115 DeviceMotionData* deviceMotionData = DeviceMotionData::create(acceleration, accelerationIncludingGravity, rotationRate, intervalProvided, interval);
116 impl->initDeviceMotionEvent(type, bubbles, cancelable, deviceMotionData); 116 impl->initDeviceMotionEvent(type, bubbles, cancelable, deviceMotionData);
117 } 117 }
118 118
119 } // namespace blink 119 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698