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

Unified Diff: Source/core/dom/FullscreenElementStack.h

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/FullscreenElementStack.h
diff --git a/Source/core/dom/FullscreenElementStack.h b/Source/core/dom/FullscreenElementStack.h
index 346ea1e520a3c31a42e1ab0c626ee7835f1510a9..71ac402b7d1990222327b08350daa51eaff074ac 100644
--- a/Source/core/dom/FullscreenElementStack.h
+++ b/Source/core/dom/FullscreenElementStack.h
@@ -52,11 +52,11 @@ class FullscreenElementStack FINAL
public:
virtual ~FullscreenElementStack();
static const char* supplementName();
- static FullscreenElementStack* from(Document*);
- static FullscreenElementStack* fromIfExists(Document*);
- static Element* fullscreenElementFrom(Document*);
- static Element* currentFullScreenElementFrom(Document*);
- static bool isFullScreen(Document*);
+ static FullscreenElementStack& from(Document&);
+ static FullscreenElementStack* fromIfExists(Document&);
+ static Element* fullscreenElementFrom(Document&);
+ static Element* currentFullScreenElementFrom(Document&);
+ static bool isFullScreen(Document&);
static bool isActiveFullScreenElement(const Element*);
enum FullScreenCheckType {
@@ -86,7 +86,7 @@ public:
void removeFullScreenElementOfSubtree(Node*, bool amongChildrenOnly = false);
// W3C API
- static bool webkitFullscreenEnabled(Document*);
+ static bool webkitFullscreenEnabled(Document&);
Element* webkitFullscreenElement() const { return !m_fullScreenElementStack.isEmpty() ? m_fullScreenElementStack.last().get() : 0; }
void webkitExitFullscreen();
@@ -98,9 +98,9 @@ public:
virtual void documentWasDisposed() OVERRIDE;
private:
- static FullscreenElementStack* fromIfExistsSlow(Document*);
+ static FullscreenElementStack* fromIfExistsSlow(Document&);
- explicit FullscreenElementStack(Document*);
+ explicit FullscreenElementStack(Document&);
Document* document();
void fullScreenChangeDelayTimerFired(Timer<FullscreenElementStack>*);
@@ -118,15 +118,15 @@ private:
inline bool FullscreenElementStack::isActiveFullScreenElement(const Element* element)
{
- FullscreenElementStack* controller = fromIfExists(&element->document());
+ FullscreenElementStack* controller = fromIfExists(element->document());
if (!controller)
return false;
return controller->webkitIsFullScreen() && controller->webkitCurrentFullScreenElement() == element;
}
-inline FullscreenElementStack* FullscreenElementStack::fromIfExists(Document* document)
+inline FullscreenElementStack* FullscreenElementStack::fromIfExists(Document& document)
{
- if (!document->hasFullscreenElementStack())
+ if (!document.hasFullscreenElementStack())
return 0;
return fromIfExistsSlow(document);
}

Powered by Google App Engine
This is Rietveld 408576698