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

Side by Side Diff: content/shell/renderer/webkit_test_runner.cc

Issue 596623002: Fix orientation change callbacks to go through WebLocalFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/shell/renderer/webkit_test_runner.h" 5 #include "content/shell/renderer/webkit_test_runner.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <clocale> 8 #include <clocale>
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 void WebKitTestRunner::SetDeviceOrientationData( 219 void WebKitTestRunner::SetDeviceOrientationData(
220 const WebDeviceOrientationData& data) { 220 const WebDeviceOrientationData& data) {
221 SetMockDeviceOrientationData(data); 221 SetMockDeviceOrientationData(data);
222 } 222 }
223 223
224 void WebKitTestRunner::SetScreenOrientation( 224 void WebKitTestRunner::SetScreenOrientation(
225 const WebScreenOrientationType& orientation) { 225 const WebScreenOrientationType& orientation) {
226 MockScreenOrientationClient* mock_client = 226 MockScreenOrientationClient* mock_client =
227 proxy()->GetScreenOrientationClientMock(); 227 proxy()->GetScreenOrientationClientMock();
228 mock_client->UpdateDeviceOrientation(render_view()->GetWebView()->mainFrame(), 228 DCHECK(render_view()->GetWebView()->mainFrame()->isWebLocalFrame());
jam 2014/09/23 05:17:14 ditto
dcheng 2014/09/23 05:24:34 Done.
229 orientation); 229 mock_client->UpdateDeviceOrientation(
230 render_view()->GetWebView()->mainFrame()->toWebLocalFrame(), orientation);
230 } 231 }
231 232
232 void WebKitTestRunner::ResetScreenOrientation() { 233 void WebKitTestRunner::ResetScreenOrientation() {
233 MockScreenOrientationClient* mock_client = 234 MockScreenOrientationClient* mock_client =
234 proxy()->GetScreenOrientationClientMock(); 235 proxy()->GetScreenOrientationClientMock();
235 mock_client->ResetData(); 236 mock_client->ResetData();
236 } 237 }
237 238
238 void WebKitTestRunner::DidChangeBatteryStatus( 239 void WebKitTestRunner::DidChangeBatteryStatus(
239 const blink::WebBatteryStatus& status) { 240 const blink::WebBatteryStatus& status) {
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 748
748 leak_detector_->TryLeakDetection(main_frame); 749 leak_detector_->TryLeakDetection(main_frame);
749 } 750 }
750 751
751 void WebKitTestRunner::ReportLeakDetectionResult( 752 void WebKitTestRunner::ReportLeakDetectionResult(
752 const LeakDetectionResult& report) { 753 const LeakDetectionResult& report) {
753 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 754 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
754 } 755 }
755 756
756 } // namespace content 757 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698