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

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

Issue 2842253002: Move ReportLocalLoadFailed to ExecutionContext (Closed)
Patch Set: Revert ResourceLoader changes, handle main resource redirect in DocumentLoader 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 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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 return false; 613 return false;
614 614
615 LocalFrame* frame = GetDocument().GetFrame(); 615 LocalFrame* frame = GetDocument().GetFrame();
616 Settings* settings = frame->GetSettings(); 616 Settings* settings = frame->GetSettings();
617 if (!settings) 617 if (!settings)
618 return false; 618 return false;
619 619
620 if (MIMETypeRegistry::IsJavaAppletMIMEType(mime_type)) 620 if (MIMETypeRegistry::IsJavaAppletMIMEType(mime_type))
621 return false; 621 return false;
622 622
623 if (!GetDocument().GetSecurityOrigin()->CanDisplay(url)) {
624 FrameLoader::ReportLocalLoadFailed(frame, url.GetString());
625 return false;
626 }
627
628 AtomicString declared_mime_type = FastGetAttribute(HTMLNames::typeAttr); 623 AtomicString declared_mime_type = FastGetAttribute(HTMLNames::typeAttr);
629 if (!GetDocument().GetContentSecurityPolicy()->AllowObjectFromSource(url) || 624 if (!GetDocument().GetContentSecurityPolicy()->AllowObjectFromSource(url) ||
630 !GetDocument().GetContentSecurityPolicy()->AllowPluginTypeForDocument( 625 !GetDocument().GetContentSecurityPolicy()->AllowPluginTypeForDocument(
631 GetDocument(), mime_type, declared_mime_type, url)) { 626 GetDocument(), mime_type, declared_mime_type, url)) {
632 if (LayoutEmbeddedItem layout_item = GetLayoutEmbeddedItem()) { 627 if (LayoutEmbeddedItem layout_item = GetLayoutEmbeddedItem()) {
633 plugin_is_available_ = false; 628 plugin_is_available_ = false;
634 layout_item.SetPluginAvailability( 629 layout_item.SetPluginAvailability(
635 LayoutEmbeddedObject::kPluginBlockedByContentSecurityPolicy); 630 LayoutEmbeddedObject::kPluginBlockedByContentSecurityPolicy);
636 } 631 }
637 return false; 632 return false;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 668
674 void HTMLPlugInElement::LazyReattachIfNeeded() { 669 void HTMLPlugInElement::LazyReattachIfNeeded() {
675 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && 670 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() &&
676 !IsImageType()) { 671 !IsImageType()) {
677 LazyReattachIfAttached(); 672 LazyReattachIfAttached();
678 SetPersistedPlugin(nullptr); 673 SetPersistedPlugin(nullptr);
679 } 674 }
680 } 675 }
681 676
682 } // namespace blink 677 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | third_party/WebKit/Source/core/loader/BaseFetchContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698