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

Side by Side Diff: Source/modules/screen_orientation/ScreenOrientation.h

Issue 315693002: Use WebViewClient instead of BlinkPlatform for screen lock. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 #ifndef ScreenOrientation_h 5 #ifndef ScreenOrientation_h
6 #define ScreenOrientation_h 6 #define ScreenOrientation_h
7 7
8 #include "core/frame/DOMWindowProperty.h" 8 #include "core/frame/DOMWindowProperty.h"
9 #include "platform/Supplementable.h" 9 #include "platform/Supplementable.h"
10 #include "platform/Timer.h" 10 #include "platform/Timer.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "public/platform/WebScreenOrientationLockType.h" 12 #include "public/platform/WebScreenOrientationLockType.h"
13 #include "public/platform/WebScreenOrientationType.h" 13 #include "public/platform/WebScreenOrientationType.h"
14 #include "wtf/text/AtomicString.h" 14 #include "wtf/text/AtomicString.h"
15 #include "wtf/text/WTFString.h" 15 #include "wtf/text/WTFString.h"
16 16
17 namespace WebCore { 17 namespace WebCore {
18 18
19 class Document; 19 class Document;
20 class Page;
20 class ScriptPromise; 21 class ScriptPromise;
21 class ScriptState; 22 class ScriptState;
22 class Screen; 23 class Screen;
23 24
24 class ScreenOrientation FINAL : public NoBaseWillBeGarbageCollectedFinalized<Scr eenOrientation>, public WillBeHeapSupplement<Screen>, DOMWindowProperty { 25 class ScreenOrientation FINAL : public NoBaseWillBeGarbageCollectedFinalized<Scr eenOrientation>, public WillBeHeapSupplement<Screen>, DOMWindowProperty {
25 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientation); 26 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientation);
26 public: 27 public:
27 static ScreenOrientation& from(Screen&); 28 static ScreenOrientation& from(Screen&);
28 virtual ~ScreenOrientation(); 29 virtual ~ScreenOrientation();
29 30
30 static const AtomicString& orientation(Screen&); 31 static const AtomicString& orientation(Screen&);
31 static ScriptPromise lockOrientation(ScriptState*, Screen&, const AtomicStri ng& orientation); 32 static ScriptPromise lockOrientation(ScriptState*, Screen&, const AtomicStri ng& orientation);
32 static void unlockOrientation(Screen&); 33 static void unlockOrientation(Screen&);
33 34
34 // Helper being used by this class and LockOrientationCallback. 35 // Helper being used by this class and LockOrientationCallback.
35 static const AtomicString& orientationTypeToString(blink::WebScreenOrientati onType); 36 static const AtomicString& orientationTypeToString(blink::WebScreenOrientati onType);
36 37
37 virtual void trace(Visitor* visitor) OVERRIDE { WillBeHeapSupplement<Screen> ::trace(visitor); } 38 virtual void trace(Visitor* visitor) OVERRIDE { WillBeHeapSupplement<Screen> ::trace(visitor); }
38 39
39 private: 40 private:
40 explicit ScreenOrientation(Screen&); 41 explicit ScreenOrientation(Screen&);
41 42
42 static const char* supplementName(); 43 static const char* supplementName();
43 Document* document() const; 44 Document* document() const;
45 Page* page() const;
eseidel 2014/06/03 20:57:49 Are you sure you want Page and not FrameHost?
44 }; 46 };
45 47
46 } // namespace WebCore 48 } // namespace WebCore
47 49
48 #endif // ScreenOrientation_h 50 #endif // ScreenOrientation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698