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

Side by Side Diff: third_party/WebKit/Source/core/page/Page.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: Add comment 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 void Page::setNeedsRecalcStyleInAllFrames() 222 void Page::setNeedsRecalcStyleInAllFrames()
223 { 223 {
224 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext() ) { 224 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext() ) {
225 if (frame->isLocalFrame()) 225 if (frame->isLocalFrame())
226 toLocalFrame(frame)->document()->setNeedsStyleRecalc(SubtreeStyleCha nge, StyleChangeReasonForTracing::create(StyleChangeReason::Settings)); 226 toLocalFrame(frame)->document()->setNeedsStyleRecalc(SubtreeStyleCha nge, StyleChangeReasonForTracing::create(StyleChangeReason::Settings));
227 } 227 }
228 } 228 }
229 229
230 void Page::refreshPlugins() 230 void Page::refreshPlugins()
231 { 231 {
232 if (allPages().isEmpty()) 232 PluginData::refreshBrowserSidePluginCache();
233 return;
234
235 PluginData::refresh();
236 233
237 for (const Page* page : allPages()) { 234 for (const Page* page : allPages()) {
238 // Clear out the page's plugin data. 235 // Clear out the page's plugin data.
239 if (page->m_pluginData) 236 if (page->m_pluginData)
240 page->m_pluginData = nullptr; 237 page->m_pluginData = nullptr;
241 } 238 }
242 } 239 }
243 240
244 PluginData* Page::pluginData() const 241 PluginData* Page::pluginData(SecurityOrigin* mainFrameOrigin) const
245 { 242 {
246 if (!m_pluginData) 243 if (!m_pluginData || !mainFrameOrigin->isSameSchemeHostPort(m_pluginData->or igin()))
247 m_pluginData = PluginData::create(this); 244 m_pluginData = PluginData::create(mainFrameOrigin);
248 return m_pluginData.get(); 245 return m_pluginData.get();
249 } 246 }
250 247
251 void Page::setValidationMessageClient(ValidationMessageClient* client) 248 void Page::setValidationMessageClient(ValidationMessageClient* client)
252 { 249 {
253 m_validationMessageClient = client; 250 m_validationMessageClient = client;
254 } 251 }
255 252
256 void Page::setDefersLoading(bool defers) 253 void Page::setDefersLoading(bool defers)
257 { 254 {
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 { 518 {
522 } 519 }
523 520
524 Page::PageClients::~PageClients() 521 Page::PageClients::~PageClients()
525 { 522 {
526 } 523 }
527 524
528 template class CORE_TEMPLATE_EXPORT Supplement<Page>; 525 template class CORE_TEMPLATE_EXPORT Supplement<Page>;
529 526
530 } // namespace blink 527 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.h ('k') | third_party/WebKit/Source/platform/plugins/PluginData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698