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

Unified Diff: content/renderer/device_orientation_dispatcher.cc

Issue 10542025: Changed device_orientation_dispatcher to use default constructor in WebDeviceOrientation.h. This de… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/device_orientation_dispatcher.cc
diff --git a/content/renderer/device_orientation_dispatcher.cc b/content/renderer/device_orientation_dispatcher.cc
index a0a66a460a6825d58213559995d34186ce117430..023272efaccfb29d4fc28c7caea9d221290f93a1 100644
--- a/content/renderer/device_orientation_dispatcher.cc
+++ b/content/renderer/device_orientation_dispatcher.cc
@@ -83,14 +83,17 @@ void DeviceOrientationDispatcher::OnDeviceOrientationUpdated(
if (last_orientation_.get() && OrientationsEqual(p, last_orientation_.get()))
return;
- last_orientation_.reset(new WebKit::WebDeviceOrientation(p.can_provide_alpha,
- p.alpha,
- p.can_provide_beta,
- p.beta,
- p.can_provide_gamma,
- p.gamma,
- p.can_provide_absolute,
- p.absolute));
-
+ WebKit::WebDeviceOrientation *orientation =
jamesr 2012/06/06 23:09:05 why is the allocated on the heap? it looks like th
+ new WebKit::WebDeviceOrientation();
+ orientation->setNull(false);
+ if (p.can_provide_alpha)
+ orientation->setAlpha(p.alpha);
+ if (p.can_provide_beta)
+ orientation->setBeta(p.beta);
+ if (p.can_provide_gamma)
+ orientation->setGamma(p.gamma);
+ if (p.can_provide_absolute)
+ orientation->setAbsolute(p.absolute);
+ last_orientation_.reset(orientation);
controller_->didChangeDeviceOrientation(*last_orientation_);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698