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

Side by Side Diff: Source/web/FullscreenController.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/EditorClientImpl.cpp ('k') | Source/web/ValidationMessageClientImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 , m_isCancelingFullScreen(false) 54 , m_isCancelingFullScreen(false)
55 { 55 {
56 } 56 }
57 57
58 void FullscreenController::willEnterFullScreen() 58 void FullscreenController::willEnterFullScreen()
59 { 59 {
60 if (!m_provisionalFullScreenElement) 60 if (!m_provisionalFullScreenElement)
61 return; 61 return;
62 62
63 // Ensure that this element's document is still attached. 63 // Ensure that this element's document is still attached.
64 Document* doc = m_provisionalFullScreenElement->document(); 64 Document& doc = m_provisionalFullScreenElement->document();
65 if (doc->frame()) { 65 if (doc.frame()) {
66 FullscreenElementStack::from(doc)->webkitWillEnterFullScreenForElement(m _provisionalFullScreenElement.get()); 66 FullscreenElementStack::from(&doc)->webkitWillEnterFullScreenForElement( m_provisionalFullScreenElement.get());
67 m_fullScreenFrame = doc->frame(); 67 m_fullScreenFrame = doc.frame();
68 } 68 }
69 m_provisionalFullScreenElement.clear(); 69 m_provisionalFullScreenElement.clear();
70 } 70 }
71 71
72 void FullscreenController::didEnterFullScreen() 72 void FullscreenController::didEnterFullScreen()
73 { 73 {
74 if (!m_fullScreenFrame) 74 if (!m_fullScreenFrame)
75 return; 75 return;
76 76
77 if (Document* doc = m_fullScreenFrame->document()) { 77 if (Document* doc = m_fullScreenFrame->document()) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 mediaElement->player()->exitFullscreen(); 176 mediaElement->player()->exitFullscreen();
177 return; 177 return;
178 } 178 }
179 #endif 179 #endif
180 if (WebViewClient* client = m_webViewImpl->client()) 180 if (WebViewClient* client = m_webViewImpl->client())
181 client->exitFullScreen(); 181 client->exitFullScreen();
182 } 182 }
183 183
184 } 184 }
185 185
OLDNEW
« no previous file with comments | « Source/web/EditorClientImpl.cpp ('k') | Source/web/ValidationMessageClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698