OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 extension, profile_); | 149 extension, profile_); |
150 return; | 150 return; |
151 } | 151 } |
152 | 152 |
153 // Extensions aren't enabled by default in incognito so we confirm | 153 // Extensions aren't enabled by default in incognito so we confirm |
154 // the install in a normal window. | 154 // the install in a normal window. |
155 Profile* profile = profile_->GetOriginalProfile(); | 155 Profile* profile = profile_->GetOriginalProfile(); |
156 Browser* browser = Browser::GetOrCreateTabbedBrowser(profile); | 156 Browser* browser = Browser::GetOrCreateTabbedBrowser(profile); |
157 if (browser->tab_count() == 0) | 157 if (browser->tab_count() == 0) |
158 browser->AddBlankTab(true); | 158 browser->AddBlankTab(true); |
159 browser->window()->Show(); | 159 browser->window()->Show(BrowserWindow::SHOW_CONTEXT_NORMAL); |
160 | 160 |
161 bool use_bubble_for_apps = false; | 161 bool use_bubble_for_apps = false; |
162 | 162 |
163 #if defined(TOOLKIT_VIEWS) | 163 #if defined(TOOLKIT_VIEWS) |
164 CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 164 CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
165 use_bubble_for_apps = (use_app_installed_bubble_ || | 165 use_bubble_for_apps = (use_app_installed_bubble_ || |
166 cmdline->HasSwitch(switches::kAppsNewInstallBubble)); | 166 cmdline->HasSwitch(switches::kAppsNewInstallBubble)); |
167 #endif | 167 #endif |
168 | 168 |
169 if (extension->is_app() && !use_bubble_for_apps) { | 169 if (extension->is_app() && !use_bubble_for_apps) { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 303 |
304 InfoBarDelegate* ExtensionInstallUI::GetNewThemeInstalledInfoBarDelegate( | 304 InfoBarDelegate* ExtensionInstallUI::GetNewThemeInstalledInfoBarDelegate( |
305 TabContents* tab_contents, | 305 TabContents* tab_contents, |
306 const Extension* new_theme, | 306 const Extension* new_theme, |
307 const std::string& previous_theme_id, | 307 const std::string& previous_theme_id, |
308 bool previous_using_native_theme) { | 308 bool previous_using_native_theme) { |
309 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, | 309 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, |
310 previous_theme_id, | 310 previous_theme_id, |
311 previous_using_native_theme); | 311 previous_using_native_theme); |
312 } | 312 } |
OLD | NEW |