Index: chrome/browser/plugins/plugin_observer.cc |
=================================================================== |
--- chrome/browser/plugins/plugin_observer.cc (revision 233357) |
+++ chrome/browser/plugins/plugin_observer.cc (working copy) |
@@ -182,6 +182,25 @@ |
#endif |
} |
+void PluginObserver::RenderViewCreated( |
+ content::RenderViewHost* render_view_host) { |
+#if defined(USE_AURA) && defined(OS_WIN) |
+ // If the window belongs to the Ash desktop, before we navigate we need |
+ // to tell the renderview that NPAPI plugins are not supported so it does |
+ // not try to instantiate them. The final decision is actually done in |
+ // the IO thread by PluginInfoMessageFilter of this proces,s but it's more |
+ // complex to manage a map of Ash views in PluginInfoMessageFilter than |
+ // just telling the renderer via IPC. |
+ content::WebContentsView* wcv = web_contents()->GetView(); |
+ aura::Window* window = wcv->GetNativeView(); |
+ if (chrome::GetHostDesktopTypeForNativeView(window) == |
+ chrome::HOST_DESKTOP_TYPE_ASH) { |
+ int routing_id = render_view_host->GetRoutingID(); |
+ render_view_host->Send(new ChromeViewMsg_NPAPINotSupported(routing_id)); |
+ } |
+#endif |
+} |
+ |
void PluginObserver::PluginCrashed(const base::FilePath& plugin_path, |
base::ProcessId plugin_pid) { |
DCHECK(!plugin_path.value().empty()); |
@@ -254,31 +273,6 @@ |
return true; |
} |
-void PluginObserver::AboutToNavigateRenderView( |
- content::RenderViewHost* render_view_host) { |
-#if defined(USE_AURA) && defined(OS_WIN) |
- // If the window belongs to the Ash desktop, before we navigate we need |
- // to tell the renderview that NPAPI plugins are not supported so it does |
- // not try to instantiate them. The final decision is actually done in |
- // the IO thread by PluginInfoMessageFilter of this proces,s but it's more |
- // complex to manage a map of Ash views in PluginInfoMessageFilter than |
- // just telling the renderer via IPC. |
- if (!web_contents()) |
- return; |
- |
- content::WebContentsView* wcv = web_contents()->GetView(); |
- if (!wcv) |
- return; |
- |
- aura::Window* window = wcv->GetNativeView(); |
- if (chrome::GetHostDesktopTypeForNativeView(window) == |
- chrome::HOST_DESKTOP_TYPE_ASH) { |
- int routing_id = render_view_host->GetRoutingID(); |
- render_view_host->Send(new ChromeViewMsg_NPAPINotSupported(routing_id)); |
- } |
-#endif |
-} |
- |
void PluginObserver::OnBlockedUnauthorizedPlugin( |
const string16& name, |
const std::string& identifier) { |