| 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/browser/shell_content_browser_client.h" | 5 #include "extensions/shell/browser/shell_content_browser_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/public/browser/render_process_host.h" | 9 #include "content/public/browser/render_process_host.h" |
| 10 #include "content/public/browser/site_instance.h" | 10 #include "content/public/browser/site_instance.h" |
| 11 #include "content/public/common/content_switches.h" | 11 #include "content/public/common/content_switches.h" |
| 12 #include "content/public/common/url_constants.h" | 12 #include "content/public/common/url_constants.h" |
| 13 #include "content/shell/browser/shell_browser_context.h" | 13 #include "content/shell/browser/shell_browser_context.h" |
| 14 #include "content/shell/browser/shell_devtools_delegate.h" |
| 14 #include "extensions/browser/extension_message_filter.h" | 15 #include "extensions/browser/extension_message_filter.h" |
| 15 #include "extensions/browser/extension_protocols.h" | 16 #include "extensions/browser/extension_protocols.h" |
| 16 #include "extensions/browser/extension_registry.h" | 17 #include "extensions/browser/extension_registry.h" |
| 17 #include "extensions/browser/info_map.h" | 18 #include "extensions/browser/info_map.h" |
| 18 #include "extensions/browser/process_map.h" | 19 #include "extensions/browser/process_map.h" |
| 19 #include "extensions/common/constants.h" | 20 #include "extensions/common/constants.h" |
| 20 #include "extensions/common/extension.h" | 21 #include "extensions/common/extension.h" |
| 21 #include "extensions/common/switches.h" | 22 #include "extensions/common/switches.h" |
| 22 #include "extensions/shell/browser/shell_browser_context.h" | 23 #include "extensions/shell/browser/shell_browser_context.h" |
| 23 #include "extensions/shell/browser/shell_browser_main_parts.h" | 24 #include "extensions/shell/browser/shell_browser_main_parts.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 238 } |
| 238 | 239 |
| 239 const Extension* ShellContentBrowserClient::GetExtension( | 240 const Extension* ShellContentBrowserClient::GetExtension( |
| 240 content::SiteInstance* site_instance) { | 241 content::SiteInstance* site_instance) { |
| 241 ExtensionRegistry* registry = | 242 ExtensionRegistry* registry = |
| 242 ExtensionRegistry::Get(site_instance->GetBrowserContext()); | 243 ExtensionRegistry::Get(site_instance->GetBrowserContext()); |
| 243 return registry->enabled_extensions().GetExtensionOrAppByURL( | 244 return registry->enabled_extensions().GetExtensionOrAppByURL( |
| 244 site_instance->GetSiteURL()); | 245 site_instance->GetSiteURL()); |
| 245 } | 246 } |
| 246 | 247 |
| 248 content::DevToolsManagerDelegate* |
| 249 ShellContentBrowserClient::GetDevToolsManagerDelegate() { |
| 250 return new content::ShellDevToolsManagerDelegate(GetBrowserContext()); |
| 251 } |
| 252 |
| 247 } // namespace extensions | 253 } // namespace extensions |
| OLD | NEW |