| OLD | NEW |
| 1 // Copyright (c) 2012 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 "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "chrome/browser/extensions/extension_event_router.h" | 8 #include "chrome/browser/extensions/extension_event_router.h" |
| 9 #include "chrome/browser/extensions/extension_process_manager.h" | 9 #include "chrome/browser/extensions/extension_process_manager.h" |
| 10 #include "chrome/browser/extensions/extension_host.h" | 10 #include "chrome/browser/extensions/extension_host.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
| 28 #include "content/public/common/renderer_preferences.h" | 28 #include "content/public/common/renderer_preferences.h" |
| 29 | 29 |
| 30 #if defined(OS_MACOSX) | 30 #if defined(OS_MACOSX) |
| 31 #include "chrome/browser/extensions/extension_host_mac.h" | 31 #include "chrome/browser/extensions/extension_host_mac.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 using content::BrowserThread; | 34 using content::BrowserThread; |
| 35 using content::OpenURLParams; | 35 using content::OpenURLParams; |
| 36 using content::Referrer; | 36 using content::Referrer; |
| 37 using content::RenderViewHost; |
| 37 using content::SiteInstance; | 38 using content::SiteInstance; |
| 38 | 39 |
| 39 namespace { | 40 namespace { |
| 40 | 41 |
| 41 // An accessor for an extension's lazy_keepalive_count. | 42 // An accessor for an extension's lazy_keepalive_count. |
| 42 // TODO(mpcomplete): Should we store this on ExtensionHost instead? | 43 // TODO(mpcomplete): Should we store this on ExtensionHost instead? |
| 43 static base::LazyInstance<base::PropertyAccessor<int> > | 44 static base::LazyInstance<base::PropertyAccessor<int> > |
| 44 g_property_accessor = LAZY_INSTANCE_INITIALIZER; | 45 g_property_accessor = LAZY_INSTANCE_INITIALIZER; |
| 45 | 46 |
| 46 int& GetLazyKeepaliveCount(Profile* profile, const Extension* extension) { | 47 int& GetLazyKeepaliveCount(Profile* profile, const Extension* extension) { |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 if (service && service->is_ready()) | 607 if (service && service->is_ready()) |
| 607 CreateBackgroundHostsForProfileStartup(this, service->extensions()); | 608 CreateBackgroundHostsForProfileStartup(this, service->extensions()); |
| 608 } | 609 } |
| 609 break; | 610 break; |
| 610 } | 611 } |
| 611 default: | 612 default: |
| 612 ExtensionProcessManager::Observe(type, source, details); | 613 ExtensionProcessManager::Observe(type, source, details); |
| 613 break; | 614 break; |
| 614 } | 615 } |
| 615 } | 616 } |
| OLD | NEW |