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.
5 #ifndef ScreenOrientationController_h
6 #define ScreenOrientationController_h
8 #include "core/dom/DocumentSupplementable.h"
9 #include "public/platform/WebScreenOrientationType.h"
13 class ScreenOrientationController FINAL : public NoBaseWillBeGarbageCollected<ScreenOrientationController>, public DocumentSupplement {
14 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationController);
17 virtual ~ScreenOrientationController();
20 void didChangeScreenOrientation(blink::WebScreenOrientationType);
22 blink::WebScreenOrientationType orientation() const { return m_orientation; }
24 // DocumentSupplement API.
25 static ScreenOrientationController& from(Document&);
26 static const char* supplementName();
29 explicit ScreenOrientationController(Document&);
31 void dispatchOrientationChangeEvent();
34 blink::WebScreenOrientationType m_orientation;
37 } // namespace WebCore
39 #endif // ScreenOrientationController_h