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

Unified Diff: chrome/renderer/render_thread.cc

Issue 88020: Allow Flash (and other plugins) to be installed without restarting the browse... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_thread.cc
===================================================================
--- chrome/renderer/render_thread.cc (revision 14070)
+++ chrome/renderer/render_thread.cc (working copy)
@@ -62,13 +62,15 @@
RenderThread::RenderThread()
: ChildThread(
base::Thread::Options(RenderProcess::InProcessPlugins() ?
- MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT, kV8StackSize)) {
+ MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT, kV8StackSize)),
+ plugin_refresh_allowed_(true) {
}
RenderThread::RenderThread(const std::wstring& channel_name)
: ChildThread(
base::Thread::Options(RenderProcess::InProcessPlugins() ?
- MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT, kV8StackSize)) {
+ MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT, kV8StackSize)),
+ plugin_refresh_allowed_(true) {
SetChannelName(channel_name);
}
@@ -197,6 +199,8 @@
OnExtensionHandleEvent)
IPC_MESSAGE_HANDLER(ViewMsg_Extension_SetFunctionNames,
OnSetExtensionFunctionNames)
+ IPC_MESSAGE_HANDLER(ViewMsg_PurgePluginListCache,
+ OnPurgePluginListCache)
IPC_END_MESSAGE_MAP()
}
@@ -335,3 +339,13 @@
const std::string event_data) {
RendererExtensionBindings::HandleEvent(event_name, event_data);
}
+
+void RenderThread::OnPurgePluginListCache() {
+ // The call below will cause a GetPlugins call with refresh=true, but at this
+ // point we already know that the browser has refreshed its list, so disable
+ // refresh temporarily to prevent each renderer process causing the list to be
+ // regenerated.
+ plugin_refresh_allowed_ = false;
+ WebKit::resetPluginCache();
+ plugin_refresh_allowed_ = true;
+}
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698