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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp

Issue 2842253002: Move ReportLocalLoadFailed to ExecutionContext (Closed)
Patch Set: +comment Created 3 years, 7 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) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 return false; 611 return false;
612 612
613 LocalFrame* frame = GetDocument().GetFrame(); 613 LocalFrame* frame = GetDocument().GetFrame();
614 Settings* settings = frame->GetSettings(); 614 Settings* settings = frame->GetSettings();
615 if (!settings) 615 if (!settings)
616 return false; 616 return false;
617 617
618 if (MIMETypeRegistry::IsJavaAppletMIMEType(mime_type)) 618 if (MIMETypeRegistry::IsJavaAppletMIMEType(mime_type))
619 return false; 619 return false;
620 620
621 if (!GetDocument().GetSecurityOrigin()->CanDisplay(url)) {
622 FrameLoader::ReportLocalLoadFailed(frame, url.GetString());
623 return false;
624 }
625
626 AtomicString declared_mime_type = FastGetAttribute(HTMLNames::typeAttr); 621 AtomicString declared_mime_type = FastGetAttribute(HTMLNames::typeAttr);
627 if (!GetDocument().GetContentSecurityPolicy()->AllowObjectFromSource(url) || 622 if (!GetDocument().GetContentSecurityPolicy()->AllowObjectFromSource(url) ||
628 !GetDocument().GetContentSecurityPolicy()->AllowPluginTypeForDocument( 623 !GetDocument().GetContentSecurityPolicy()->AllowPluginTypeForDocument(
629 GetDocument(), mime_type, declared_mime_type, url)) { 624 GetDocument(), mime_type, declared_mime_type, url)) {
630 if (LayoutEmbeddedItem layout_item = GetLayoutEmbeddedItem()) { 625 if (LayoutEmbeddedItem layout_item = GetLayoutEmbeddedItem()) {
631 plugin_is_available_ = false; 626 plugin_is_available_ = false;
632 layout_item.SetPluginAvailability( 627 layout_item.SetPluginAvailability(
633 LayoutEmbeddedObject::kPluginBlockedByContentSecurityPolicy); 628 LayoutEmbeddedObject::kPluginBlockedByContentSecurityPolicy);
634 } 629 }
635 return false; 630 return false;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 666
672 void HTMLPlugInElement::LazyReattachIfNeeded() { 667 void HTMLPlugInElement::LazyReattachIfNeeded() {
673 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && 668 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() &&
674 !IsImageType()) { 669 !IsImageType()) {
675 LazyReattachIfAttached(); 670 LazyReattachIfAttached();
676 SetPersistedPlugin(nullptr); 671 SetPersistedPlugin(nullptr);
677 } 672 }
678 } 673 }
679 674
680 } // namespace blink 675 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698