| 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 "chrome/browser/extensions/extension_infobar_delegate.h" | 5 #include "chrome/browser/extensions/extension_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/extensions/extension_host.h" | 8 #include "chrome/browser/extensions/extension_host.h" |
| 9 #include "chrome/browser/extensions/extension_host_factory.h" | 9 #include "chrome/browser/extensions/extension_host_factory.h" |
| 10 #include "chrome/browser/infobars/infobar.h" | 10 #include "chrome/browser/infobars/infobar.h" |
| 11 #include "chrome/browser/infobars/infobar_service.h" | 11 #include "chrome/browser/infobars/infobar_service.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/common/extensions/extension.h" | |
| 15 #include "content/public/browser/notification_details.h" | 14 #include "content/public/browser/notification_details.h" |
| 16 #include "content/public/browser/notification_source.h" | 15 #include "content/public/browser/notification_source.h" |
| 16 #include "extensions/common/extension.h" |
| 17 | 17 |
| 18 ExtensionInfoBarDelegate::~ExtensionInfoBarDelegate() { | 18 ExtensionInfoBarDelegate::~ExtensionInfoBarDelegate() { |
| 19 if (observer_) | 19 if (observer_) |
| 20 observer_->OnDelegateDeleted(); | 20 observer_->OnDelegateDeleted(); |
| 21 } | 21 } |
| 22 | 22 |
| 23 // static | 23 // static |
| 24 void ExtensionInfoBarDelegate::Create(InfoBarService* infobar_service, | 24 void ExtensionInfoBarDelegate::Create(InfoBarService* infobar_service, |
| 25 Browser* browser, | 25 Browser* browser, |
| 26 const extensions::Extension* extension, | 26 const extensions::Extension* extension, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 if (extension_host_.get() == | 106 if (extension_host_.get() == |
| 107 content::Details<extensions::ExtensionHost>(details).ptr()) | 107 content::Details<extensions::ExtensionHost>(details).ptr()) |
| 108 RemoveSelf(); | 108 RemoveSelf(); |
| 109 } else { | 109 } else { |
| 110 DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED); | 110 DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED); |
| 111 if (extension_ == content::Details<extensions::UnloadedExtensionInfo>( | 111 if (extension_ == content::Details<extensions::UnloadedExtensionInfo>( |
| 112 details)->extension) | 112 details)->extension) |
| 113 RemoveSelf(); | 113 RemoveSelf(); |
| 114 } | 114 } |
| 115 } | 115 } |
| OLD | NEW |