| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #ifndef FullscreenController_h | 31 #ifndef FullscreenController_h |
| 32 #define FullscreenController_h | 32 #define FullscreenController_h |
| 33 | 33 |
| 34 #include "platform/geometry/FloatPoint.h" | 34 #include "platform/geometry/FloatPoint.h" |
| 35 #include "platform/geometry/IntSize.h" | 35 #include "platform/geometry/IntSize.h" |
| 36 #include "platform/heap/Handle.h" | 36 #include "platform/heap/Handle.h" |
| 37 #include "wtf/PassOwnPtr.h" | 37 #include "wtf/PassOwnPtr.h" |
| 38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 |
| 41 class Element; | 42 class Element; |
| 42 class LocalFrame; | 43 class LocalFrame; |
| 43 } | |
| 44 | |
| 45 namespace blink { | |
| 46 class WebViewImpl; | 44 class WebViewImpl; |
| 47 | 45 |
| 48 class FullscreenController { | 46 class FullscreenController { |
| 49 public: | 47 public: |
| 50 static PassOwnPtr<FullscreenController> create(WebViewImpl*); | 48 static PassOwnPtr<FullscreenController> create(WebViewImpl*); |
| 51 | 49 |
| 52 void willEnterFullScreen(); | 50 void willEnterFullScreen(); |
| 53 void didEnterFullScreen(); | 51 void didEnterFullScreen(); |
| 54 void willExitFullScreen(); | 52 void willExitFullScreen(); |
| 55 void didExitFullScreen(); | 53 void didExitFullScreen(); |
| 56 | 54 |
| 57 void enterFullScreenForElement(blink::Element*); | 55 void enterFullScreenForElement(Element*); |
| 58 void exitFullScreenForElement(blink::Element*); | 56 void exitFullScreenForElement(Element*); |
| 59 | 57 |
| 60 bool isFullscreen() { return m_fullScreenFrame; } | 58 bool isFullscreen() { return m_fullScreenFrame; } |
| 61 | 59 |
| 62 protected: | 60 protected: |
| 63 explicit FullscreenController(WebViewImpl*); | 61 explicit FullscreenController(WebViewImpl*); |
| 64 | 62 |
| 65 private: | 63 private: |
| 66 WebViewImpl* m_webViewImpl; | 64 WebViewImpl* m_webViewImpl; |
| 67 | 65 |
| 68 float m_exitFullscreenPageScaleFactor; | 66 float m_exitFullscreenPageScaleFactor; |
| 69 blink::IntSize m_exitFullscreenScrollOffset; | 67 IntSize m_exitFullscreenScrollOffset; |
| 70 blink::FloatPoint m_exitFullscreenPinchViewportOffset; | 68 FloatPoint m_exitFullscreenPinchViewportOffset; |
| 71 | 69 |
| 72 // If set, the WebView is transitioning to fullscreen for this element. | 70 // If set, the WebView is transitioning to fullscreen for this element. |
| 73 RefPtrWillBePersistent<blink::Element> m_provisionalFullScreenElement; | 71 RefPtrWillBePersistent<Element> m_provisionalFullScreenElement; |
| 74 | 72 |
| 75 // If set, the WebView is in fullscreen mode for an element in this frame. | 73 // If set, the WebView is in fullscreen mode for an element in this frame. |
| 76 RefPtr<blink::LocalFrame> m_fullScreenFrame; | 74 RefPtr<LocalFrame> m_fullScreenFrame; |
| 77 | 75 |
| 78 bool m_isCancelingFullScreen; | 76 bool m_isCancelingFullScreen; |
| 79 }; | 77 }; |
| 80 | 78 |
| 81 } | 79 } // namespace blink |
| 82 | 80 |
| 83 #endif | 81 #endif |
| 84 | 82 |
| OLD | NEW |