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

Side by Side Diff: content/renderer/device_orientation_dispatcher.cc

Issue 20707002: Implement Device Orientation using shared memory in content/renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: excluded orientation pump tests on win bots Created 7 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/device_orientation_dispatcher.h" 5 #include "content/renderer/device_orientation_dispatcher.h"
6 6
7 #include "content/common/device_orientation_messages.h" 7 #include "content/common/device_orientation/device_orientation_messages.h"
8 #include "content/renderer/render_view_impl.h" 8 #include "content/renderer/render_view_impl.h"
9 #include "third_party/WebKit/public/web/WebDeviceOrientation.h" 9 #include "third_party/WebKit/public/web/WebDeviceOrientation.h"
10 #include "third_party/WebKit/public/web/WebDeviceOrientationController.h" 10 #include "third_party/WebKit/public/web/WebDeviceOrientationController.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 DeviceOrientationDispatcher::DeviceOrientationDispatcher( 14 DeviceOrientationDispatcher::DeviceOrientationDispatcher(
15 RenderViewImpl* render_view) 15 RenderViewImpl* render_view)
16 : RenderViewObserver(render_view), started_(false) {} 16 : RenderViewObserver(render_view), started_(false) {}
17 17
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (p.can_provide_beta) 85 if (p.can_provide_beta)
86 last_orientation_.setBeta(p.beta); 86 last_orientation_.setBeta(p.beta);
87 if (p.can_provide_gamma) 87 if (p.can_provide_gamma)
88 last_orientation_.setGamma(p.gamma); 88 last_orientation_.setGamma(p.gamma);
89 if (p.can_provide_absolute) 89 if (p.can_provide_absolute)
90 last_orientation_.setAbsolute(p.absolute); 90 last_orientation_.setAbsolute(p.absolute);
91 controller_->didChangeDeviceOrientation(last_orientation_); 91 controller_->didChangeDeviceOrientation(last_orientation_);
92 } 92 }
93 93
94 } // namespace content 94 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698