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

Side by Side Diff: Source/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp

Issue 234403004: Rename V8TRYCATCH_* macros in v8/V8BindingMacros.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: BOOL*_BOOL -> BOOL* Created 6 years, 8 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 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 17 matching lines...) Expand all
28 28
29 #include "bindings/v8/V8Binding.h" 29 #include "bindings/v8/V8Binding.h"
30 #include "modules/device_orientation/DeviceOrientationData.h" 30 #include "modules/device_orientation/DeviceOrientationData.h"
31 #include <v8.h> 31 #include <v8.h>
32 32
33 namespace WebCore { 33 namespace WebCore {
34 34
35 void V8DeviceOrientationEvent::initDeviceOrientationEventMethodCustom(const v8:: FunctionCallbackInfo<v8::Value>& info) 35 void V8DeviceOrientationEvent::initDeviceOrientationEventMethodCustom(const v8:: FunctionCallbackInfo<v8::Value>& info)
36 { 36 {
37 DeviceOrientationEvent* impl = V8DeviceOrientationEvent::toNative(info.Holde r()); 37 DeviceOrientationEvent* impl = V8DeviceOrientationEvent::toNative(info.Holde r());
38 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, info[0]); 38 TOSTRING_VOID(V8StringResource<>, type, info[0]);
39 bool bubbles = info[1]->BooleanValue(); 39 bool bubbles = info[1]->BooleanValue();
40 bool cancelable = info[2]->BooleanValue(); 40 bool cancelable = info[2]->BooleanValue();
41 // If alpha, beta, gamma or absolute are null or undefined, mark them as not provided. 41 // If alpha, beta, gamma or absolute are null or undefined, mark them as not provided.
42 // Otherwise, use the standard JavaScript conversion. 42 // Otherwise, use the standard JavaScript conversion.
43 bool alphaProvided = !isUndefinedOrNull(info[3]); 43 bool alphaProvided = !isUndefinedOrNull(info[3]);
44 double alpha = info[3]->NumberValue(); 44 double alpha = info[3]->NumberValue();
45 bool betaProvided = !isUndefinedOrNull(info[4]); 45 bool betaProvided = !isUndefinedOrNull(info[4]);
46 double beta = info[4]->NumberValue(); 46 double beta = info[4]->NumberValue();
47 bool gammaProvided = !isUndefinedOrNull(info[5]); 47 bool gammaProvided = !isUndefinedOrNull(info[5]);
48 double gamma = info[5]->NumberValue(); 48 double gamma = info[5]->NumberValue();
49 bool absoluteProvided = !isUndefinedOrNull(info[6]); 49 bool absoluteProvided = !isUndefinedOrNull(info[6]);
50 bool absolute = info[6]->BooleanValue(); 50 bool absolute = info[6]->BooleanValue();
51 RefPtrWillBeRawPtr<DeviceOrientationData> orientation = DeviceOrientationDat a::create(alphaProvided, alpha, betaProvided, beta, gammaProvided, gamma, absolu teProvided, absolute); 51 RefPtrWillBeRawPtr<DeviceOrientationData> orientation = DeviceOrientationDat a::create(alphaProvided, alpha, betaProvided, beta, gammaProvided, gamma, absolu teProvided, absolute);
52 impl->initDeviceOrientationEvent(type, bubbles, cancelable, orientation.get( )); 52 impl->initDeviceOrientationEvent(type, bubbles, cancelable, orientation.get( ));
53 } 53 }
54 54
55 } // namespace WebCore 55 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8DeviceMotionEventCustom.cpp ('k') | Source/bindings/v8/custom/V8DocumentCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698