| 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 26 matching lines...) Expand all Loading... |
| 37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
| 38 #include "wtf/PassOwnPtr.h" | 38 #include "wtf/PassOwnPtr.h" |
| 39 #include "wtf/RefPtr.h" | 39 #include "wtf/RefPtr.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class Element; | 43 class Element; |
| 44 class LocalFrame; | 44 class LocalFrame; |
| 45 class WebViewImpl; | 45 class WebViewImpl; |
| 46 | 46 |
| 47 class FullscreenController final : public NoBaseWillBeGarbageCollected<Fullscree
nController> { | 47 class FullscreenController final : public GarbageCollected<FullscreenController>
{ |
| 48 public: | 48 public: |
| 49 static PassOwnPtrWillBeRawPtr<FullscreenController> create(WebViewImpl*); | 49 static RawPtr<FullscreenController> create(WebViewImpl*); |
| 50 | 50 |
| 51 void didEnterFullScreen(); | 51 void didEnterFullScreen(); |
| 52 void didExitFullScreen(); | 52 void didExitFullScreen(); |
| 53 | 53 |
| 54 void enterFullScreenForElement(Element*); | 54 void enterFullScreenForElement(Element*); |
| 55 void exitFullScreenForElement(Element*); | 55 void exitFullScreenForElement(Element*); |
| 56 | 56 |
| 57 bool isFullscreen() { return m_fullScreenFrame; } | 57 bool isFullscreen() { return m_fullScreenFrame; } |
| 58 | 58 |
| 59 void updateSize(); | 59 void updateSize(); |
| 60 | 60 |
| 61 DECLARE_TRACE(); | 61 DECLARE_TRACE(); |
| 62 | 62 |
| 63 protected: | 63 protected: |
| 64 explicit FullscreenController(WebViewImpl*); | 64 explicit FullscreenController(WebViewImpl*); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 void updatePageScaleConstraints(bool removeConstraints); | 67 void updatePageScaleConstraints(bool removeConstraints); |
| 68 | 68 |
| 69 WebViewImpl* m_webViewImpl; | 69 WebViewImpl* m_webViewImpl; |
| 70 | 70 |
| 71 bool m_haveEnteredFullscreen; | 71 bool m_haveEnteredFullscreen; |
| 72 float m_exitFullscreenPageScaleFactor; | 72 float m_exitFullscreenPageScaleFactor; |
| 73 IntSize m_exitFullscreenScrollOffset; | 73 IntSize m_exitFullscreenScrollOffset; |
| 74 FloatPoint m_exitFullscreenVisualViewportOffset; | 74 FloatPoint m_exitFullscreenVisualViewportOffset; |
| 75 | 75 |
| 76 // If set, the WebView is transitioning to fullscreen for this element. | 76 // If set, the WebView is transitioning to fullscreen for this element. |
| 77 RefPtrWillBeMember<Element> m_provisionalFullScreenElement; | 77 Member<Element> m_provisionalFullScreenElement; |
| 78 | 78 |
| 79 // If set, the WebView is in fullscreen mode for an element in this frame. | 79 // If set, the WebView is in fullscreen mode for an element in this frame. |
| 80 RefPtrWillBeMember<LocalFrame> m_fullScreenFrame; | 80 Member<LocalFrame> m_fullScreenFrame; |
| 81 | 81 |
| 82 bool m_isCancelingFullScreen; | 82 bool m_isCancelingFullScreen; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace blink | 85 } // namespace blink |
| 86 | 86 |
| 87 #endif | 87 #endif |
| OLD | NEW |