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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMImplementation.cpp

Issue 2156803002: [HBD] Remove PluginCache and reload plugin list when origin changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove static refresh variable Created 4 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
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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) 6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org)
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 { 218 {
219 if (inViewSourceMode) 219 if (inViewSourceMode)
220 return HTMLViewSourceDocument::create(init, type); 220 return HTMLViewSourceDocument::create(init, type);
221 221
222 // Plugins cannot take HTML and XHTML from us, and we don't even need to ini tialize the plugin database for those. 222 // Plugins cannot take HTML and XHTML from us, and we don't even need to ini tialize the plugin database for those.
223 if (type == "text/html") 223 if (type == "text/html")
224 return HTMLDocument::create(init); 224 return HTMLDocument::create(init);
225 if (type == "application/xhtml+xml") 225 if (type == "application/xhtml+xml")
226 return XMLDocument::createXHTML(init); 226 return XMLDocument::createXHTML(init);
227 227
228 PluginData* pluginData = 0; 228 PluginData* pluginData = nullptr;
229 if (init.frame() && init.frame()->page() && init.frame()->loader().allowPlug ins(NotAboutToInstantiatePlugin)) 229 if (init.frame() && init.frame()->page() && init.frame()->loader().allowPlug ins(NotAboutToInstantiatePlugin))
230 pluginData = init.frame()->pluginData(); 230 pluginData = init.frame()->page()->pluginData(init.frame()->isMainFrame( ) ? SecurityOrigin::create(init.url()).get() : init.frame()->tree().top()->secur ityContext()->getSecurityOrigin());
esprehn 2016/08/29 20:54:56 why not always call tree().top() ? Calling .get()
trizzofo 2016/08/29 21:32:32 When the document is being created for the main fr
231 231
232 // PDF is one image type for which a plugin can override built-in support. 232 // PDF is one image type for which a plugin can override built-in support.
233 // We do not want QuickTime to take over all image types, obviously. 233 // We do not want QuickTime to take over all image types, obviously.
234 if ((type == "application/pdf" || type == "text/pdf") && pluginData && plugi nData->supportsMimeType(type)) 234 if ((type == "application/pdf" || type == "text/pdf") && pluginData && plugi nData->supportsMimeType(type))
235 return PluginDocument::create(init); 235 return PluginDocument::create(init);
236 // multipart/x-mixed-replace is only supported for images. 236 // multipart/x-mixed-replace is only supported for images.
237 if (Image::supportsType(type) || type == "multipart/x-mixed-replace") 237 if (Image::supportsType(type) || type == "multipart/x-mixed-replace")
238 return ImageDocument::create(init); 238 return ImageDocument::create(init);
239 239
240 // Check to see if the type can be played by our media player, if so create a MediaDocument 240 // Check to see if the type can be played by our media player, if so create a MediaDocument
(...skipping 14 matching lines...) Expand all
255 255
256 return HTMLDocument::create(init); 256 return HTMLDocument::create(init);
257 } 257 }
258 258
259 DEFINE_TRACE(DOMImplementation) 259 DEFINE_TRACE(DOMImplementation)
260 { 260 {
261 visitor->trace(m_document); 261 visitor->trace(m_document);
262 } 262 }
263 263
264 } // namespace blink 264 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/test_blink_web_unit_test_support.cc ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698