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

Side by Side Diff: content/renderer/screen_orientation/mock_screen_orientation_controller.h

Issue 339913002: Move MockScreenOrientationController to content/shell/renderer/test_runner/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix layer violation Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_SCREEN_ORIENTATION_MOCK_SCREEN_ORIENTATION_CONTROLLER_H _
6 #define CONTENT_RENDERER_SCREEN_ORIENTATION_MOCK_SCREEN_ORIENTATION_CONTROLLER_H _
7
8 #include "base/lazy_instance.h"
9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h"
11 #include "content/public/renderer/render_view_observer.h"
12 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
13 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
14
15 namespace content {
16 class RenderView;
17 class RenderViewImpl;
18
19 class MockScreenOrientationController
20 : public base::RefCountedThreadSafe<MockScreenOrientationController>,
21 public RenderViewObserver {
22 public:
23 MockScreenOrientationController();
24
25 void ResetData();
26 void UpdateDeviceOrientation(RenderView* render_view,
27 blink::WebScreenOrientationType);
28
29 private:
30 virtual ~MockScreenOrientationController();
31
32 void UpdateScreenOrientation(blink::WebScreenOrientationType);
33 bool IsOrientationAllowedByCurrentLock(blink::WebScreenOrientationType);
34 RenderViewImpl* render_view_impl() const;
35
36 // RenderViewObserver
37 virtual void OnDestruct() OVERRIDE;
38
39 blink::WebScreenOrientationLockType current_lock_;
40 blink::WebScreenOrientationType device_orientation_;
41 blink::WebScreenOrientationType current_orientation_;
42
43 DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationController);
44 friend class base::LazyInstance<MockScreenOrientationController>;
45 friend class base::RefCountedThreadSafe<MockScreenOrientationController>;
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_RENDERER_SCREEN_ORIENTATION_MOCK_SCREEN_ORIENTATION_CONTROLLER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698