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

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

Issue 2823025: Fix theme loading bubble which was overstaying its welcome.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 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
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_install_ui.h" 5 #include "chrome/browser/extensions/extension_install_ui.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 void ExtensionInstallUI::ShowThemeInfoBar( 302 void ExtensionInstallUI::ShowThemeInfoBar(
303 const std::string& previous_theme_id, bool previous_use_system_theme, 303 const std::string& previous_theme_id, bool previous_use_system_theme,
304 Extension* new_theme, Profile* profile) { 304 Extension* new_theme, Profile* profile) {
305 if (!new_theme->is_theme()) 305 if (!new_theme->is_theme())
306 return; 306 return;
307 307
308 // Get last active normal browser of profile. 308 // Get last active normal browser of profile.
309 Browser* browser = BrowserList::FindBrowserWithType(profile, 309 Browser* browser = BrowserList::FindBrowserWithType(profile,
310 Browser::TYPE_NORMAL, 310 Browser::TYPE_NORMAL,
311 false); 311 true);
312 if (!browser) 312 if (!browser)
313 return; 313 return;
314 314
315 TabContents* tab_contents = browser->GetSelectedTabContents(); 315 TabContents* tab_contents = browser->GetSelectedTabContents();
316 if (!tab_contents) 316 if (!tab_contents)
317 return; 317 return;
318 318
319 // First find any previous theme preview infobars. 319 // First find any previous theme preview infobars.
320 InfoBarDelegate* old_delegate = NULL; 320 InfoBarDelegate* old_delegate = NULL;
321 for (int i = 0; i < tab_contents->infobar_delegate_count(); ++i) { 321 for (int i = 0; i < tab_contents->infobar_delegate_count(); ++i) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 TabContents* tab_contents, Extension* new_theme, 380 TabContents* tab_contents, Extension* new_theme,
381 const std::string& previous_theme_id, bool previous_use_system_theme) { 381 const std::string& previous_theme_id, bool previous_use_system_theme) {
382 #if defined(TOOLKIT_GTK) 382 #if defined(TOOLKIT_GTK)
383 return new GtkThemeInstalledInfoBarDelegate(tab_contents, new_theme, 383 return new GtkThemeInstalledInfoBarDelegate(tab_contents, new_theme,
384 previous_theme_id, previous_use_system_theme); 384 previous_theme_id, previous_use_system_theme);
385 #else 385 #else
386 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, 386 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme,
387 previous_theme_id); 387 previous_theme_id);
388 #endif 388 #endif
389 } 389 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698