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/extensions/extension_host.h" | 7 #include "chrome/browser/extensions/extension_host.h" |
8 #include "chrome/browser/extensions/extension_process_manager.h" | 8 #include "chrome/browser/extensions/extension_process_manager.h" |
9 #include "chrome/browser/infobars/infobar.h" | 9 #include "chrome/browser/infobars/infobar.h" |
10 #include "chrome/browser/infobars/infobar_tab_helper.h" | 10 #include "chrome/browser/infobars/infobar_tab_helper.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 ExtensionInfoBarDelegate* | 85 ExtensionInfoBarDelegate* |
86 ExtensionInfoBarDelegate::AsExtensionInfoBarDelegate() { | 86 ExtensionInfoBarDelegate::AsExtensionInfoBarDelegate() { |
87 return this; | 87 return this; |
88 } | 88 } |
89 | 89 |
90 void ExtensionInfoBarDelegate::Observe( | 90 void ExtensionInfoBarDelegate::Observe( |
91 int type, | 91 int type, |
92 const content::NotificationSource& source, | 92 const content::NotificationSource& source, |
93 const content::NotificationDetails& details) { | 93 const content::NotificationDetails& details) { |
94 if (type == chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE) { | 94 if (type == chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE) { |
95 if (extension_host_.get() == content::Details<ExtensionHost>(details).ptr()) | 95 if (extension_host_.get() == |
| 96 content::Details<extensions::ExtensionHost>(details).ptr()) |
96 RemoveSelf(); | 97 RemoveSelf(); |
97 } else { | 98 } else { |
98 DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED); | 99 DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED); |
99 if (extension_ == | 100 if (extension_ == |
100 content::Details<extensions::UnloadedExtensionInfo>( | 101 content::Details<extensions::UnloadedExtensionInfo>( |
101 details)->extension) { | 102 details)->extension) { |
102 RemoveSelf(); | 103 RemoveSelf(); |
103 } | 104 } |
104 } | 105 } |
105 } | 106 } |
OLD | NEW |