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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. Created 3 years, 6 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
« no previous file with comments | « content/renderer/pepper/pepper_file_system_host.cc ('k') | content/renderer/pepper/url_request_info_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 9b606fdcc19180c1d593e449b67d4afa8b5abd94..623827f06618f638d8d5b24541ca6d56dc72f3e0 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -3190,7 +3190,11 @@ void PepperPluginInstanceImpl::DoSetCursor(WebCursorInfo* cursor) {
bool PepperPluginInstanceImpl::IsFullPagePlugin() {
WebLocalFrame* frame = container()->GetDocument().GetFrame();
return frame->View()->MainFrame()->IsWebLocalFrame() &&
- frame->View()->MainFrame()->GetDocument().IsPluginDocument();
+ frame->View()
+ ->MainFrame()
+ ->ToWebLocalFrame()
+ ->GetDocument()
+ .IsPluginDocument();
}
bool PepperPluginInstanceImpl::FlashSetFullscreen(bool fullscreen,
@@ -3319,11 +3323,11 @@ bool PepperPluginInstanceImpl::CanAccessMainFrame() const {
!containing_document.GetFrame()->View()->MainFrame()) {
return false;
}
- blink::WebDocument main_document =
- containing_document.GetFrame()->View()->MainFrame()->GetDocument();
+ blink::WebFrame* main_frame =
+ containing_document.GetFrame()->View()->MainFrame();
return containing_document.GetSecurityOrigin().CanAccess(
- main_document.GetSecurityOrigin());
+ main_frame->GetSecurityOrigin());
}
void PepperPluginInstanceImpl::KeepSizeAttributesBeforeFullscreen() {
« no previous file with comments | « content/renderer/pepper/pepper_file_system_host.cc ('k') | content/renderer/pepper/url_request_info_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698