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

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

Issue 14241006: Eliminate InfoBarTabHelper. Make InfoBarService a concrete class. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 months 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) 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/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/infobars/infobar.h" 10 #include "chrome/browser/infobars/infobar.h"
(...skipping 29 matching lines...) Expand all
40 const GURL& url, 40 const GURL& url,
41 int height) 41 int height)
42 : InfoBarDelegate(infobar_service), 42 : InfoBarDelegate(infobar_service),
43 browser_(browser), 43 browser_(browser),
44 observer_(NULL), 44 observer_(NULL),
45 extension_(extension), 45 extension_(extension),
46 closing_(false) { 46 closing_(false) {
47 ExtensionProcessManager* manager = 47 ExtensionProcessManager* manager =
48 extensions::ExtensionSystem::Get(browser->profile())->process_manager(); 48 extensions::ExtensionSystem::Get(browser->profile())->process_manager();
49 extension_host_.reset(manager->CreateInfobarHost(url, browser)); 49 extension_host_.reset(manager->CreateInfobarHost(url, browser));
50 extension_host_->SetAssociatedWebContents(infobar_service->GetWebContents()); 50 extension_host_->SetAssociatedWebContents(infobar_service->web_contents());
51 51
52 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE, 52 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
53 content::Source<Profile>(browser->profile())); 53 content::Source<Profile>(browser->profile()));
54 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 54 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
55 content::Source<Profile>(browser->profile())); 55 content::Source<Profile>(browser->profile()));
56 56
57 #if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) 57 #if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK)
58 int default_height = InfoBar::kDefaultBarTargetHeight; 58 int default_height = InfoBar::kDefaultBarTargetHeight;
59 #elif defined(OS_MACOSX) 59 #elif defined(OS_MACOSX)
60 // TODO(pkasting): Once Infobars have been ported to Mac, we can remove the 60 // TODO(pkasting): Once Infobars have been ported to Mac, we can remove the
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 RemoveSelf(); 110 RemoveSelf();
111 } else { 111 } else {
112 DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED); 112 DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED);
113 if (extension_ == 113 if (extension_ ==
114 content::Details<extensions::UnloadedExtensionInfo>( 114 content::Details<extensions::UnloadedExtensionInfo>(
115 details)->extension) { 115 details)->extension) {
116 RemoveSelf(); 116 RemoveSelf();
117 } 117 }
118 } 118 }
119 } 119 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/extension_install_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698