| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_process_manager.h" | 5 #include "chrome/browser/extensions/extension_process_manager.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/browser_window.h" | 7 #include "chrome/browser/ui/browser_window.h" |
| 8 #include "content/browser/browsing_instance.h" | 8 #include "content/browser/browsing_instance.h" |
| 9 #if defined(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
| 10 #include "chrome/browser/extensions/extension_host_mac.h" | 10 #include "chrome/browser/extensions/extension_host_mac.h" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 284 } |
| 285 break; | 285 break; |
| 286 } | 286 } |
| 287 | 287 |
| 288 case NotificationType::EXTENSION_UNLOADED: { | 288 case NotificationType::EXTENSION_UNLOADED: { |
| 289 const Extension* extension = | 289 const Extension* extension = |
| 290 Details<UnloadedExtensionInfo>(details)->extension; | 290 Details<UnloadedExtensionInfo>(details)->extension; |
| 291 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); | 291 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); |
| 292 iter != background_hosts_.end(); ++iter) { | 292 iter != background_hosts_.end(); ++iter) { |
| 293 ExtensionHost* host = *iter; | 293 ExtensionHost* host = *iter; |
| 294 if (host->extension()->id() == extension->id()) { | 294 if (host->id() == extension->id()) { |
| 295 delete host; | 295 delete host; |
| 296 // |host| should deregister itself from our structures. | 296 // |host| should deregister itself from our structures. |
| 297 DCHECK(background_hosts_.find(host) == background_hosts_.end()); | 297 DCHECK(background_hosts_.find(host) == background_hosts_.end()); |
| 298 break; | 298 break; |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 break; | 301 break; |
| 302 } | 302 } |
| 303 | 303 |
| 304 case NotificationType::EXTENSION_HOST_DESTROYED: { | 304 case NotificationType::EXTENSION_HOST_DESTROYED: { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 if (service && service->is_ready()) | 452 if (service && service->is_ready()) |
| 453 CreateBackgroundHosts(this, service->extensions()); | 453 CreateBackgroundHosts(this, service->extensions()); |
| 454 } | 454 } |
| 455 break; | 455 break; |
| 456 } | 456 } |
| 457 default: | 457 default: |
| 458 ExtensionProcessManager::Observe(type, source, details); | 458 ExtensionProcessManager::Observe(type, source, details); |
| 459 break; | 459 break; |
| 460 } | 460 } |
| 461 } | 461 } |
| OLD | NEW |