Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: chrome/browser/extensions/extension_infobar_delegate.cc

Issue 5968009: Change extension unload notification to indicate updates.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_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/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/tab_contents/tab_contents.h" 10 #include "chrome/browser/tab_contents/tab_contents.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/common/extensions/extension.h"
12 #include "chrome/common/notification_details.h" 13 #include "chrome/common/notification_details.h"
13 #include "chrome/common/notification_source.h" 14 #include "chrome/common/notification_source.h"
14 #include "chrome/common/notification_type.h" 15 #include "chrome/common/notification_type.h"
15 16
16 ExtensionInfoBarDelegate::ExtensionInfoBarDelegate(Browser* browser, 17 ExtensionInfoBarDelegate::ExtensionInfoBarDelegate(Browser* browser,
17 TabContents* tab_contents, 18 TabContents* tab_contents,
18 const Extension* extension, 19 const Extension* extension,
19 const GURL& url) 20 const GURL& url)
20 : InfoBarDelegate(tab_contents), 21 : InfoBarDelegate(tab_contents),
21 observer_(NULL), 22 observer_(NULL),
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const NotificationSource& source, 76 const NotificationSource& source,
76 const NotificationDetails& details) { 77 const NotificationDetails& details) {
77 switch (type.value) { 78 switch (type.value) {
78 case NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE: { 79 case NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE: {
79 const ExtensionHost* result = Details<ExtensionHost>(details).ptr(); 80 const ExtensionHost* result = Details<ExtensionHost>(details).ptr();
80 if (extension_host_.get() == result) 81 if (extension_host_.get() == result)
81 tab_contents_->RemoveInfoBar(this); 82 tab_contents_->RemoveInfoBar(this);
82 break; 83 break;
83 } 84 }
84 case NotificationType::EXTENSION_UNLOADED: { 85 case NotificationType::EXTENSION_UNLOADED: {
85 const Extension* extension = Details<const Extension>(details).ptr(); 86 const Extension* extension =
87 Details<UnloadedExtensionInfo>(details)->extension;
86 if (extension_ == extension) 88 if (extension_ == extension)
87 tab_contents_->RemoveInfoBar(this); 89 tab_contents_->RemoveInfoBar(this);
88 break; 90 break;
89 } 91 }
90 default: { 92 default: {
91 NOTREACHED() << "Unknown message"; 93 NOTREACHED() << "Unknown message";
92 break; 94 break;
93 } 95 }
94 } 96 }
95 } 97 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698