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

Side by Side Diff: third_party/WebKit/Source/core/frame/ScreenOrientationController.h

Issue 2779523002: Use ScreenOrientationController and not the implementation to break modules/ dep. (Closed)
Patch Set: Created 3 years, 8 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 | third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegateTest.cpp » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 ScreenOrientationController_h 5 #ifndef ScreenOrientationController_h
6 #define ScreenOrientationController_h 6 #define ScreenOrientationController_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
(...skipping 11 matching lines...) Expand all
22 class CORE_EXPORT ScreenOrientationController 22 class CORE_EXPORT ScreenOrientationController
23 : public GarbageCollectedFinalized<ScreenOrientationController>, 23 : public GarbageCollectedFinalized<ScreenOrientationController>,
24 public Supplement<LocalFrame> { 24 public Supplement<LocalFrame> {
25 USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController); 25 USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController);
26 26
27 public: 27 public:
28 virtual ~ScreenOrientationController() = default; 28 virtual ~ScreenOrientationController() = default;
29 29
30 static ScreenOrientationController* from(LocalFrame&); 30 static ScreenOrientationController* from(LocalFrame&);
31 31
32 virtual void notifyOrientationChanged() = 0;
33
32 virtual void lock(WebScreenOrientationLockType, 34 virtual void lock(WebScreenOrientationLockType,
33 std::unique_ptr<WebLockOrientationCallback>) = 0; 35 std::unique_ptr<WebLockOrientationCallback>) = 0;
34 virtual void unlock() = 0; 36 virtual void unlock() = 0;
35 37
36 // Returns whether a lock() call was made without an unlock() call. Others 38 // Returns whether a lock() call was made without an unlock() call. Others
37 // frames might have changed the lock state so this should only be used to 39 // frames might have changed the lock state so this should only be used to
38 // know whether the current frame made an attempt to lock without explicitly 40 // know whether the current frame made an attempt to lock without explicitly
39 // unlocking. 41 // unlocking.
40 virtual bool maybeHasActiveLock() const = 0; 42 virtual bool maybeHasActiveLock() const = 0;
41 43
42 DECLARE_VIRTUAL_TRACE(); 44 DECLARE_VIRTUAL_TRACE();
43 45
44 protected: 46 protected:
45 explicit ScreenOrientationController(LocalFrame&); 47 explicit ScreenOrientationController(LocalFrame&);
46 // To be called by an ScreenOrientationController to register its 48 // To be called by an ScreenOrientationController to register its
47 // implementation. 49 // implementation.
48 static void provideTo(LocalFrame&, ScreenOrientationController*); 50 static void provideTo(LocalFrame&, ScreenOrientationController*);
49 51
50 private: 52 private:
51 static const char* supplementName(); 53 static const char* supplementName();
52 }; 54 };
53 55
54 } // namespace blink 56 } // namespace blink
55 57
56 #endif // ScreenOrientationController_h 58 #endif // ScreenOrientationController_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegateTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698