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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class LocalFrame; | 42 class LocalFrame; |
43 class WebViewImpl; | 43 class WebViewImpl; |
44 | 44 |
45 class FullscreenController final : public GarbageCollected<FullscreenController>
{ | 45 class FullscreenController final : public GarbageCollected<FullscreenController>
{ |
46 public: | 46 public: |
47 static FullscreenController* create(WebViewImpl*); | 47 static FullscreenController* create(WebViewImpl*); |
48 | 48 |
49 void didEnterFullscreen(); | 49 void didEnterFullscreen(); |
50 void didExitFullscreen(); | 50 void didExitFullscreen(); |
51 | 51 |
52 void enterFullScreenForElement(Element*); | 52 void enterFullscreenForElement(Element*); |
53 void exitFullScreenForElement(Element*); | 53 void exitFullscreenForElement(Element*); |
54 | 54 |
55 bool isFullscreen() { return m_fullScreenFrame; } | 55 bool isFullscreen() { return m_fullscreenFrame; } |
56 | 56 |
57 void updateSize(); | 57 void updateSize(); |
58 | 58 |
59 void didUpdateLayout(); | 59 void didUpdateLayout(); |
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 bool m_needsScrollAndScaleRestore; | 75 bool m_needsScrollAndScaleRestore; |
76 | 76 |
77 // If set, the WebView is transitioning to fullscreen for this element. | 77 // If set, the WebView is transitioning to fullscreen for this element. |
78 Member<Element> m_provisionalFullScreenElement; | 78 Member<Element> m_provisionalFullscreenElement; |
79 | 79 |
80 // If set, the WebView is in fullscreen mode for an element in this frame. | 80 // If set, the WebView is in fullscreen mode for an element in this frame. |
81 Member<LocalFrame> m_fullScreenFrame; | 81 Member<LocalFrame> m_fullscreenFrame; |
82 | 82 |
83 bool m_isCancelingFullScreen; | 83 bool m_isCancelingFullscreen; |
84 }; | 84 }; |
85 | 85 |
86 } // namespace blink | 86 } // namespace blink |
87 | 87 |
88 #endif | 88 #endif |
OLD | NEW |