Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: third_party/WebKit/Source/core/dom/Fullscreen.h

Issue 2325663002: Make Fullscreen::requestFullscreen and exitFullscreen static (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2013 Google Inc. All rights reserved. 9 * Copyright (C) 2013 Google Inc. All rights reserved.
10 * 10 *
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Element.requestFullscreen() 62 // Element.requestFullscreen()
63 UnprefixedRequest, 63 UnprefixedRequest,
64 // Element.webkitRequestFullscreen()/webkitRequestFullScreen() and 64 // Element.webkitRequestFullscreen()/webkitRequestFullScreen() and
65 // HTMLVideoElement.webkitEnterFullscreen()/webkitEnterFullScreen() 65 // HTMLVideoElement.webkitEnterFullscreen()/webkitEnterFullScreen()
66 PrefixedRequest, 66 PrefixedRequest,
67 }; 67 };
68 68
69 // |forCrossProcessDescendant| is used in OOPIF scenarios and is set to 69 // |forCrossProcessDescendant| is used in OOPIF scenarios and is set to
70 // true when fullscreen is requested for an out-of-process descendant 70 // true when fullscreen is requested for an out-of-process descendant
71 // element. 71 // element.
72 void requestFullscreen(Element&, RequestType, bool forCrossProcessDescendant = false); 72 static void requestFullscreen(Element&, RequestType, bool forCrossProcessDes cendant = false);
73 73
74 static void fullyExitFullscreen(Document&); 74 static void fullyExitFullscreen(Document&);
75 void exitFullscreen(); 75 static void exitFullscreen(Document&);
76 76
77 static bool fullscreenEnabled(Document&); 77 static bool fullscreenEnabled(Document&);
78 // TODO(foolip): The fullscreen element stack is modified synchronously in 78 // TODO(foolip): The fullscreen element stack is modified synchronously in
79 // requestFullscreen(), which is not per spec and means that 79 // requestFullscreen(), which is not per spec and means that
80 // |fullscreenElement()| is not always the same as 80 // |fullscreenElement()| is not always the same as
81 // |currentFullScreenElement()|, see https://crbug.com/402421. 81 // |currentFullScreenElement()|, see https://crbug.com/402421.
82 Element* fullscreenElement() const { return !m_fullscreenElementStack.isEmpt y() ? m_fullscreenElementStack.last().first.get() : nullptr; } 82 Element* fullscreenElement() const { return !m_fullscreenElementStack.isEmpt y() ? m_fullscreenElementStack.last().first.get() : nullptr; }
83 83
84 void didEnterFullscreenForElement(Element*); 84 void didEnterFullscreenForElement(Element*);
85 void didExitFullscreen(); 85 void didExitFullscreen();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 inline bool Fullscreen::isCurrentFullScreenElement(const Element& element) 152 inline bool Fullscreen::isCurrentFullScreenElement(const Element& element)
153 { 153 {
154 if (Fullscreen* found = fromIfExists(element.document())) 154 if (Fullscreen* found = fromIfExists(element.document()))
155 return found->currentFullScreenElement() == &element; 155 return found->currentFullScreenElement() == &element;
156 return false; 156 return false;
157 } 157 }
158 158
159 } // namespace blink 159 } // namespace blink
160 160
161 #endif // Fullscreen_h 161 #endif // Fullscreen_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698