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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 return (!mimeType.isEmpty() && url.isEmpty()) || 615 return (!mimeType.isEmpty() && url.isEmpty()) ||
616 !MixedContentChecker::shouldBlockFetch( 616 !MixedContentChecker::shouldBlockFetch(
617 frame, WebURLRequest::RequestContextObject, 617 frame, WebURLRequest::RequestContextObject,
618 WebURLRequest::FrameTypeNone, 618 WebURLRequest::FrameTypeNone,
619 ResourceRequest::RedirectStatus::NoRedirect, url); 619 ResourceRequest::RedirectStatus::NoRedirect, url);
620 } 620 }
621 621
622 bool HTMLPlugInElement::allowedToLoadPlugin(const KURL& url, 622 bool HTMLPlugInElement::allowedToLoadPlugin(const KURL& url,
623 const String& mimeType) { 623 const String& mimeType) {
624 if (document().isSandboxed(SandboxPlugins)) { 624 if (document().isSandboxed(SandboxPlugins)) {
625 document().addConsoleMessage(ConsoleMessage::create( 625 document().addConsoleMessage(
626 SecurityMessageSource, ErrorMessageLevel, 626 ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel,
627 "Failed to load '" + url.elidedString() + "' as a plugin, because the " 627 "Failed to load '" + url.elidedString() +
628 "frame into which the plugin " 628 "' as a plugin, because the "
629 "is loading is sandboxed.")); 629 "frame into which the plugin "
630 "is loading is sandboxed."));
630 return false; 631 return false;
631 } 632 }
632 return true; 633 return true;
633 } 634 }
634 635
635 void HTMLPlugInElement::didAddUserAgentShadowRoot(ShadowRoot&) { 636 void HTMLPlugInElement::didAddUserAgentShadowRoot(ShadowRoot&) {
636 userAgentShadowRoot()->appendChild(HTMLContentElement::create(document())); 637 userAgentShadowRoot()->appendChild(HTMLContentElement::create(document()));
637 } 638 }
638 639
639 bool HTMLPlugInElement::hasFallbackContent() const { 640 bool HTMLPlugInElement::hasFallbackContent() const {
640 return false; 641 return false;
641 } 642 }
642 643
643 bool HTMLPlugInElement::useFallbackContent() const { 644 bool HTMLPlugInElement::useFallbackContent() const {
644 return false; 645 return false;
645 } 646 }
646 647
647 void HTMLPlugInElement::lazyReattachIfNeeded() { 648 void HTMLPlugInElement::lazyReattachIfNeeded() {
648 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && 649 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() &&
649 !isImageType()) { 650 !isImageType()) {
650 lazyReattachIfAttached(); 651 lazyReattachIfAttached();
651 setPersistedPluginWidget(nullptr); 652 setPersistedPluginWidget(nullptr);
652 } 653 }
653 } 654 }
654 655
655 } // namespace blink 656 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLOptionElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698