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

Side by Side Diff: components/test_runner/mock_screen_orientation_client.h

Issue 2688383002: [ScreenOrientation] Merge mojo interface ScreenOrientationListener into ScreenOrientation
Patch Set: Address comments from mlamouri@ 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
« no previous file with comments | « no previous file | content/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_
6 #define COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_ 6 #define COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 24 matching lines...) Expand all
35 unsigned CurrentOrientationAngle() const; 35 unsigned CurrentOrientationAngle() const;
36 bool IsDisabled() const { return is_disabled_; } 36 bool IsDisabled() const { return is_disabled_; }
37 void SetDisabled(bool disabled); 37 void SetDisabled(bool disabled);
38 38
39 private: 39 private:
40 // From blink::WebScreenOrientationClient. 40 // From blink::WebScreenOrientationClient.
41 void lockOrientation( 41 void lockOrientation(
42 blink::WebScreenOrientationLockType orientation, 42 blink::WebScreenOrientationLockType orientation,
43 std::unique_ptr<blink::WebLockOrientationCallback> callback) override; 43 std::unique_ptr<blink::WebLockOrientationCallback> callback) override;
44 void unlockOrientation() override; 44 void unlockOrientation() override;
45 void startAccurateListen() override {}
46 void stopAccurateListen() override {}
45 47
46 void UpdateLockSync(blink::WebScreenOrientationLockType, 48 void UpdateLockSync(blink::WebScreenOrientationLockType,
47 std::unique_ptr<blink::WebLockOrientationCallback>); 49 std::unique_ptr<blink::WebLockOrientationCallback>);
48 void ResetLockSync(); 50 void ResetLockSync();
49 51
50 void UpdateScreenOrientation(blink::WebScreenOrientationType); 52 void UpdateScreenOrientation(blink::WebScreenOrientationType);
51 bool IsOrientationAllowedByCurrentLock(blink::WebScreenOrientationType); 53 bool IsOrientationAllowedByCurrentLock(blink::WebScreenOrientationType);
52 blink::WebScreenOrientationType SuitableOrientationForCurrentLock(); 54 blink::WebScreenOrientationType SuitableOrientationForCurrentLock();
53 static unsigned OrientationTypeToAngle(blink::WebScreenOrientationType); 55 static unsigned OrientationTypeToAngle(blink::WebScreenOrientationType);
54 56
55 blink::WebLocalFrame* main_frame_; 57 blink::WebLocalFrame* main_frame_;
56 blink::WebScreenOrientationLockType current_lock_; 58 blink::WebScreenOrientationLockType current_lock_;
57 blink::WebScreenOrientationType device_orientation_; 59 blink::WebScreenOrientationType device_orientation_;
58 blink::WebScreenOrientationType current_orientation_; 60 blink::WebScreenOrientationType current_orientation_;
59 bool is_disabled_; 61 bool is_disabled_;
60 62
61 DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationClient); 63 DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationClient);
62 }; 64 };
63 65
64 } // namespace test_runner 66 } // namespace test_runner
65 67
66 #endif // COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_ 68 #endif // COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698