OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_window.h" | 7 #include "chrome/browser/browser_window.h" |
8 #include "chrome/browser/browsing_instance.h" | 8 #include "chrome/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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 ExtensionService* service = | 289 ExtensionService* service = |
290 Source<Profile>(source).ptr()->GetExtensionService(); | 290 Source<Profile>(source).ptr()->GetExtensionService(); |
291 if (service->is_ready()) { | 291 if (service->is_ready()) { |
292 const Extension* extension = Details<const Extension>(details).ptr(); | 292 const Extension* extension = Details<const Extension>(details).ptr(); |
293 ::CreateBackgroundHost(this, extension); | 293 ::CreateBackgroundHost(this, extension); |
294 } | 294 } |
295 break; | 295 break; |
296 } | 296 } |
297 | 297 |
298 case NotificationType::EXTENSION_UNLOADED: { | 298 case NotificationType::EXTENSION_UNLOADED: { |
299 const Extension* extension = Details<const Extension>(details).ptr(); | 299 const Extension* extension = |
| 300 Details<UnloadedExtensionInfo>(details)->extension; |
300 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); | 301 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); |
301 iter != background_hosts_.end(); ++iter) { | 302 iter != background_hosts_.end(); ++iter) { |
302 ExtensionHost* host = *iter; | 303 ExtensionHost* host = *iter; |
303 if (host->extension()->id() == extension->id()) { | 304 if (host->extension()->id() == extension->id()) { |
304 delete host; | 305 delete host; |
305 // |host| should deregister itself from our structures. | 306 // |host| should deregister itself from our structures. |
306 DCHECK(background_hosts_.find(host) == background_hosts_.end()); | 307 DCHECK(background_hosts_.find(host) == background_hosts_.end()); |
307 break; | 308 break; |
308 } | 309 } |
309 } | 310 } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 if (service && service->is_ready()) | 462 if (service && service->is_ready()) |
462 CreateBackgroundHosts(this, service->extensions()); | 463 CreateBackgroundHosts(this, service->extensions()); |
463 } | 464 } |
464 break; | 465 break; |
465 } | 466 } |
466 default: | 467 default: |
467 ExtensionProcessManager::Observe(type, source, details); | 468 ExtensionProcessManager::Observe(type, source, details); |
468 break; | 469 break; |
469 } | 470 } |
470 } | 471 } |
OLD | NEW |