| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "chrome/browser/extensions/extension_process_manager.h" | 7 #include "chrome/browser/extensions/extension_process_manager.h" |
| 8 | 8 |
| 9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
| 10 #include "content/browser/browsing_instance.h" | 10 #include "content/browser/browsing_instance.h" |
| 11 #include "chrome/browser/extensions/extension_event_router.h" | 11 #include "chrome/browser/extensions/extension_event_router.h" |
| 12 #if defined(OS_MACOSX) | 12 #if defined(OS_MACOSX) |
| 13 #include "chrome/browser/extensions/extension_host_mac.h" | 13 #include "chrome/browser/extensions/extension_host_mac.h" |
| 14 #endif | 14 #endif |
| 15 #include "chrome/browser/extensions/extension_host.h" | 15 #include "chrome/browser/extensions/extension_host.h" |
| 16 #include "chrome/browser/extensions/extension_info_map.h" | 16 #include "chrome/browser/extensions/extension_info_map.h" |
| 17 #include "chrome/browser/extensions/extension_service.h" | 17 #include "chrome/browser/extensions/extension_service.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
| 20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
| 22 #include "chrome/common/chrome_view_type.h" | 22 #include "chrome/common/chrome_view_type.h" |
| 23 #include "chrome/common/extensions/extension.h" | 23 #include "chrome/common/extensions/extension.h" |
| 24 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 25 #include "content/browser/renderer_host/render_view_host.h" | 25 #include "content/browser/renderer_host/render_view_host.h" |
| 26 #include "content/browser/renderer_host/render_view_host_delegate.h" | 26 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 27 #include "content/browser/site_instance.h" | 27 #include "content/browser/site_instance.h" |
| 28 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
| 29 #include "content/public/browser/notification_service.h" | 29 #include "content/public/browser/notification_service.h" |
| 30 #include "content/public/browser/render_process_host.h" |
| 30 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
| 31 | 32 |
| 32 using content::BrowserThread; | 33 using content::BrowserThread; |
| 33 using content::OpenURLParams; | 34 using content::OpenURLParams; |
| 34 using content::Referrer; | 35 using content::Referrer; |
| 35 | 36 |
| 36 namespace { | 37 namespace { |
| 37 | 38 |
| 38 // Incognito profiles use this process manager. It is mostly a shim that decides | 39 // Incognito profiles use this process manager. It is mostly a shim that decides |
| 39 // whether to fall back on the original profile's ExtensionProcessManager based | 40 // whether to fall back on the original profile's ExtensionProcessManager based |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 if (service && service->is_ready()) | 485 if (service && service->is_ready()) |
| 485 CreateBackgroundHostsForProfileStartup(this, service->extensions()); | 486 CreateBackgroundHostsForProfileStartup(this, service->extensions()); |
| 486 } | 487 } |
| 487 break; | 488 break; |
| 488 } | 489 } |
| 489 default: | 490 default: |
| 490 ExtensionProcessManager::Observe(type, source, details); | 491 ExtensionProcessManager::Observe(type, source, details); |
| 491 break; | 492 break; |
| 492 } | 493 } |
| 493 } | 494 } |
| OLD | NEW |