OLD | NEW |
(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 ScreenOrientationDispatcher_h |
| 6 #define ScreenOrientationDispatcher_h |
| 7 |
| 8 #include "public/platform/WebScreenOrientationListener.h" |
| 9 #include "wtf/Vector.h" |
| 10 |
| 11 namespace WebCore { |
| 12 |
| 13 class ScreenOrientationController; |
| 14 |
| 15 class ScreenOrientationDispatcher FINAL : public blink::WebScreenOrientationList
ener { |
| 16 public: |
| 17 static ScreenOrientationDispatcher& instance(); |
| 18 |
| 19 void addController(ScreenOrientationController*); |
| 20 void removeController(ScreenOrientationController*); |
| 21 |
| 22 private: |
| 23 ScreenOrientationDispatcher(); |
| 24 |
| 25 void purgeControllers(); |
| 26 void startListening(); |
| 27 void stopListening(); |
| 28 |
| 29 // WebScreenOrientationListener API. |
| 30 virtual void didChangeScreenOrientation(blink::WebScreenOrientation) OVERRID
E; |
| 31 |
| 32 Vector<ScreenOrientationController*> m_controllers; |
| 33 bool m_needsPurge; |
| 34 bool m_isDispatching; |
| 35 }; |
| 36 |
| 37 } // namespace WebCore |
| 38 |
| 39 #endif // ScreenOrientationDispatcher_h |
OLD | NEW |