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

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

Issue 1313763002: Blink Plugins: Remove Shadow DOM Plugin Placeholder (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge origin/master Created 5 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
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | Source/web/PluginPlaceholderImpl.h » ('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) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #include "public/platform/WebVector.h" 78 #include "public/platform/WebVector.h"
79 #include "public/web/WebAutofillClient.h" 79 #include "public/web/WebAutofillClient.h"
80 #include "public/web/WebContentSettingsClient.h" 80 #include "public/web/WebContentSettingsClient.h"
81 #include "public/web/WebDOMEvent.h" 81 #include "public/web/WebDOMEvent.h"
82 #include "public/web/WebDocument.h" 82 #include "public/web/WebDocument.h"
83 #include "public/web/WebFormElement.h" 83 #include "public/web/WebFormElement.h"
84 #include "public/web/WebFrameClient.h" 84 #include "public/web/WebFrameClient.h"
85 #include "public/web/WebNode.h" 85 #include "public/web/WebNode.h"
86 #include "public/web/WebPlugin.h" 86 #include "public/web/WebPlugin.h"
87 #include "public/web/WebPluginParams.h" 87 #include "public/web/WebPluginParams.h"
88 #include "public/web/WebPluginPlaceholder.h"
89 #include "public/web/WebViewClient.h" 88 #include "public/web/WebViewClient.h"
90 #include "web/DevToolsEmulator.h" 89 #include "web/DevToolsEmulator.h"
91 #include "web/PluginPlaceholderImpl.h"
92 #include "web/SharedWorkerRepositoryClientImpl.h" 90 #include "web/SharedWorkerRepositoryClientImpl.h"
93 #include "web/WebDataSourceImpl.h" 91 #include "web/WebDataSourceImpl.h"
94 #include "web/WebDevToolsAgentImpl.h" 92 #include "web/WebDevToolsAgentImpl.h"
95 #include "web/WebDevToolsFrontendImpl.h" 93 #include "web/WebDevToolsFrontendImpl.h"
96 #include "web/WebLocalFrameImpl.h" 94 #include "web/WebLocalFrameImpl.h"
97 #include "web/WebPluginContainerImpl.h" 95 #include "web/WebPluginContainerImpl.h"
98 #include "web/WebPluginLoadObserver.h" 96 #include "web/WebPluginLoadObserver.h"
99 #include "web/WebViewImpl.h" 97 #include "web/WebViewImpl.h"
100 #include "wtf/StringExtras.h" 98 #include "wtf/StringExtras.h"
101 #include "wtf/text/CString.h" 99 #include "wtf/text/CString.h"
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 } 703 }
706 704
707 bool FrameLoaderClientImpl::canCreatePluginWithoutRenderer(const String& mimeTyp e) const 705 bool FrameLoaderClientImpl::canCreatePluginWithoutRenderer(const String& mimeTyp e) const
708 { 706 {
709 if (!m_webFrame->client()) 707 if (!m_webFrame->client())
710 return false; 708 return false;
711 709
712 return m_webFrame->client()->canCreatePluginWithoutRenderer(mimeType); 710 return m_webFrame->client()->canCreatePluginWithoutRenderer(mimeType);
713 } 711 }
714 712
715 PassOwnPtrWillBeRawPtr<PluginPlaceholder> FrameLoaderClientImpl::createPluginPla ceholder(
716 Document& document,
717 const KURL& url,
718 const Vector<String>& paramNames,
719 const Vector<String>& paramValues,
720 const String& mimeType,
721 bool loadManually)
722 {
723 if (!m_webFrame->client())
724 return nullptr;
725
726 WebPluginParams params;
727 params.url = url;
728 params.mimeType = mimeType;
729 params.attributeNames = paramNames;
730 params.attributeValues = paramValues;
731 params.loadManually = loadManually;
732
733 OwnPtr<WebPluginPlaceholder> webPluginPlaceholder = adoptPtr(
734 m_webFrame->client()->createPluginPlaceholder(m_webFrame, params));
735 if (!webPluginPlaceholder)
736 return nullptr;
737
738 return PluginPlaceholderImpl::create(webPluginPlaceholder.release(), documen t);
739 }
740
741 PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createPlugin( 713 PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createPlugin(
742 HTMLPlugInElement* element, 714 HTMLPlugInElement* element,
743 const KURL& url, 715 const KURL& url,
744 const Vector<String>& paramNames, 716 const Vector<String>& paramNames,
745 const Vector<String>& paramValues, 717 const Vector<String>& paramValues,
746 const String& mimeType, 718 const String& mimeType,
747 bool loadManually, 719 bool loadManually,
748 DetachedPluginPolicy policy) 720 DetachedPluginPolicy policy)
749 { 721 {
750 if (!m_webFrame->client()) 722 if (!m_webFrame->client())
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 956
985 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 957 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
986 { 958 {
987 if (m_webFrame->client()) { 959 if (m_webFrame->client()) {
988 m_webFrame->client()->suddenTerminationDisablerChanged( 960 m_webFrame->client()->suddenTerminationDisablerChanged(
989 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 961 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
990 } 962 }
991 } 963 }
992 964
993 } // namespace blink 965 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | Source/web/PluginPlaceholderImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698