| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "extensions/shell/renderer/shell_content_renderer_client.h" | 5 #include "extensions/shell/renderer/shell_content_renderer_client.h" | 
| 6 | 6 | 
| 7 #include "content/public/common/content_constants.h" | 7 #include "content/public/common/content_constants.h" | 
| 8 #include "content/public/renderer/render_frame.h" | 8 #include "content/public/renderer/render_frame.h" | 
| 9 #include "content/public/renderer/render_frame_observer.h" | 9 #include "content/public/renderer/render_frame_observer.h" | 
| 10 #include "content/public/renderer/render_frame_observer_tracker.h" | 10 #include "content/public/renderer/render_frame_observer_tracker.h" | 
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 123 #if !defined(DISABLE_NACL) | 123 #if !defined(DISABLE_NACL) | 
| 124   // TODO(bbudge) remove this when the trusted NaCl plugin has been removed. | 124   // TODO(bbudge) remove this when the trusted NaCl plugin has been removed. | 
| 125   // We must defer certain plugin events for NaCl instances since we switch | 125   // We must defer certain plugin events for NaCl instances since we switch | 
| 126   // from the in-process to the out-of-process proxy after instantiating them. | 126   // from the in-process to the out-of-process proxy after instantiating them. | 
| 127   return module_name == nacl::kNaClPluginName; | 127   return module_name == nacl::kNaClPluginName; | 
| 128 #else | 128 #else | 
| 129   return false; | 129   return false; | 
| 130 #endif | 130 #endif | 
| 131 } | 131 } | 
| 132 | 132 | 
| 133 bool ShellContentRendererClient::ShouldEnableSiteIsolationPolicy() const { | 133 bool ShellContentRendererClient::ShouldGatherSiteIsolationStats() const { | 
| 134   // Extension renderers don't need site isolation. |  | 
| 135   return false; | 134   return false; | 
| 136 } | 135 } | 
| 137 | 136 | 
| 138 content::BrowserPluginDelegate* | 137 content::BrowserPluginDelegate* | 
| 139 ShellContentRendererClient::CreateBrowserPluginDelegate( | 138 ShellContentRendererClient::CreateBrowserPluginDelegate( | 
| 140     content::RenderFrame* render_frame, | 139     content::RenderFrame* render_frame, | 
| 141     const std::string& mime_type, | 140     const std::string& mime_type, | 
| 142     const GURL& original_url) { | 141     const GURL& original_url) { | 
| 143   if (mime_type == content::kBrowserPluginMimeType) { | 142   if (mime_type == content::kBrowserPluginMimeType) { | 
| 144     return new extensions::ExtensionsGuestViewContainer(render_frame); | 143     return new extensions::ExtensionsGuestViewContainer(render_frame); | 
| 145   } else { | 144   } else { | 
| 146     return new extensions::MimeHandlerViewContainer( | 145     return new extensions::MimeHandlerViewContainer( | 
| 147         render_frame, mime_type, original_url); | 146         render_frame, mime_type, original_url); | 
| 148   } | 147   } | 
| 149 } | 148 } | 
| 150 | 149 | 
| 151 ExtensionsClient* ShellContentRendererClient::CreateExtensionsClient() { | 150 ExtensionsClient* ShellContentRendererClient::CreateExtensionsClient() { | 
| 152   return new ShellExtensionsClient; | 151   return new ShellExtensionsClient; | 
| 153 } | 152 } | 
| 154 | 153 | 
| 155 }  // namespace extensions | 154 }  // namespace extensions | 
| OLD | NEW | 
|---|