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

Side by Side Diff: content/shell/test_runner/mock_screen_orientation_client.cc

Issue 2707183003: Move //components/test_runner back into //content/shell (Closed)
Patch Set: Trim DEPS Created 3 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/test_runner/mock_screen_orientation_client.h" 5 #include "content/shell/test_runner/mock_screen_orientation_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
12 #include "base/threading/thread_task_runner_handle.h" 12 #include "base/threading/thread_task_runner_handle.h"
13 #include "third_party/WebKit/public/web/WebLocalFrame.h" 13 #include "third_party/WebKit/public/web/WebLocalFrame.h"
14 14
15 namespace test_runner { 15 namespace test_runner {
16 16
17 MockScreenOrientationClient::MockScreenOrientationClient() 17 MockScreenOrientationClient::MockScreenOrientationClient()
18 : main_frame_(NULL), 18 : main_frame_(NULL),
19 current_lock_(blink::WebScreenOrientationLockDefault), 19 current_lock_(blink::WebScreenOrientationLockDefault),
20 device_orientation_(blink::WebScreenOrientationPortraitPrimary), 20 device_orientation_(blink::WebScreenOrientationPortraitPrimary),
21 current_orientation_(blink::WebScreenOrientationPortraitPrimary), 21 current_orientation_(blink::WebScreenOrientationPortraitPrimary),
22 is_disabled_(false) { 22 is_disabled_(false) {}
23 }
24 23
25 MockScreenOrientationClient::~MockScreenOrientationClient() { 24 MockScreenOrientationClient::~MockScreenOrientationClient() {}
26 }
27 25
28 void MockScreenOrientationClient::ResetData() { 26 void MockScreenOrientationClient::ResetData() {
29 current_lock_ = blink::WebScreenOrientationLockDefault; 27 current_lock_ = blink::WebScreenOrientationLockDefault;
30 device_orientation_ = blink::WebScreenOrientationPortraitPrimary; 28 device_orientation_ = blink::WebScreenOrientationPortraitPrimary;
31 current_orientation_ = blink::WebScreenOrientationPortraitPrimary; 29 current_orientation_ = blink::WebScreenOrientationPortraitPrimary;
32 is_disabled_ = false; 30 is_disabled_ = false;
33 } 31 }
34 32
35 void MockScreenOrientationClient::UpdateDeviceOrientation( 33 void MockScreenOrientationClient::UpdateDeviceOrientation(
36 blink::WebLocalFrame* main_frame, 34 blink::WebLocalFrame* main_frame,
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 case blink::WebScreenOrientationLockLandscape: 155 case blink::WebScreenOrientationLockLandscape:
158 return blink::WebScreenOrientationLandscapePrimary; 156 return blink::WebScreenOrientationLandscapePrimary;
159 case blink::WebScreenOrientationLockLandscapeSecondary: 157 case blink::WebScreenOrientationLockLandscapeSecondary:
160 return blink::WebScreenOrientationLandscapePrimary; 158 return blink::WebScreenOrientationLandscapePrimary;
161 default: 159 default:
162 return blink::WebScreenOrientationPortraitPrimary; 160 return blink::WebScreenOrientationPortraitPrimary;
163 } 161 }
164 } 162 }
165 163
166 } // namespace test_runner 164 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698