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

Side by Side Diff: Source/bindings/modules/dart/custom/DartDeviceOrientationEventCustom.cpp

Issue 817913005: Track some changes to reference types (mostly Blink types moving to Oilpan). (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 5 years, 11 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 // Copyright 2011, Google Inc. 1 // Copyright 2011, Google Inc.
2 // All rights reserved. 2 // 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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 double gamma = DartUtilities::dartToDouble(args , 6, exception); 69 double gamma = DartUtilities::dartToDouble(args , 6, exception);
70 if (exception) 70 if (exception)
71 goto fail; 71 goto fail;
72 bool gammaProvided = true; 72 bool gammaProvided = true;
73 73
74 bool absolute = DartUtilities::dartToBool(Dart_GetNativeArgument(args , 7), exception); 74 bool absolute = DartUtilities::dartToBool(Dart_GetNativeArgument(args , 7), exception);
75 if (exception) 75 if (exception)
76 goto fail; 76 goto fail;
77 bool absoluteProvided = true; 77 bool absoluteProvided = true;
78 78
79 RefPtr<DeviceOrientationData> orientation = DeviceOrientationData::creat e(alphaProvided, alpha, betaProvided, beta, gammaProvided, gamma, absoluteProvid ed, absolute); 79 DeviceOrientationData* orientation = DeviceOrientationData::create(alpha Provided, alpha, betaProvided, beta, gammaProvided, gamma, absoluteProvided, abs olute);
80 receiver->initDeviceOrientationEvent(type, bubbles, cancelable, orientat ion.get()); 80 receiver->initDeviceOrientationEvent(type, bubbles, cancelable, orientat ion);
81 return; 81 return;
82 } 82 }
83 83
84 fail: 84 fail:
85 Dart_ThrowException(exception); 85 Dart_ThrowException(exception);
86 ASSERT_NOT_REACHED(); 86 ASSERT_NOT_REACHED();
87 } 87 }
88 88
89 void absoluteGetter(Dart_NativeArguments args) 89 void absoluteGetter(Dart_NativeArguments args)
90 { 90 {
(...skipping 23 matching lines...) Expand all
114 { 114 {
115 DeviceOrientationEvent* receiver = DartDOMWrapper::receiver<DeviceOrientatio nEvent>(args); 115 DeviceOrientationEvent* receiver = DartDOMWrapper::receiver<DeviceOrientatio nEvent>(args);
116 if (!receiver->orientation()->canProvideGamma()) 116 if (!receiver->orientation()->canProvideGamma())
117 return; 117 return;
118 Dart_SetReturnValue(args, DartUtilities::doubleToDart(receiver->orientation( )->gamma())); 118 Dart_SetReturnValue(args, DartUtilities::doubleToDart(receiver->orientation( )->gamma()));
119 } 119 }
120 120
121 } 121 }
122 122
123 } 123 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698