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_install_ui_default.h" | 5 #include "chrome/browser/extensions/extension_install_ui_default.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/extensions/extension_install_prompt.h" | 9 #include "chrome/browser/extensions/extension_install_prompt.h" |
10 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" | 10 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 ShowThemeInfoBar(previous_theme_id_, previous_using_native_theme_, | 117 ShowThemeInfoBar(previous_theme_id_, previous_using_native_theme_, |
118 extension, profile_); | 118 extension, profile_); |
119 return; | 119 return; |
120 } | 120 } |
121 | 121 |
122 // Extensions aren't enabled by default in incognito so we confirm | 122 // Extensions aren't enabled by default in incognito so we confirm |
123 // the install in a normal window. | 123 // the install in a normal window. |
124 Profile* current_profile = profile_->GetOriginalProfile(); | 124 Profile* current_profile = profile_->GetOriginalProfile(); |
125 Browser* browser = browser::FindOrCreateTabbedBrowser(current_profile); | 125 Browser* browser = browser::FindOrCreateTabbedBrowser(current_profile); |
126 if (browser->tab_count() == 0) | 126 if (browser->tab_count() == 0) |
127 browser->AddBlankTab(true); | 127 chrome::AddBlankTab(browser, true); |
128 browser->window()->Show(); | 128 browser->window()->Show(); |
129 | 129 |
130 bool use_bubble_for_apps = false; | 130 bool use_bubble_for_apps = false; |
131 | 131 |
132 #if defined(TOOLKIT_VIEWS) | 132 #if defined(TOOLKIT_VIEWS) |
133 CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 133 CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
134 use_bubble_for_apps = (use_app_installed_bubble_ || | 134 use_bubble_for_apps = (use_app_installed_bubble_ || |
135 cmdline->HasSwitch(switches::kAppsNewInstallBubble)); | 135 cmdline->HasSwitch(switches::kAppsNewInstallBubble)); |
136 #endif | 136 #endif |
137 | 137 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 #else | 253 #else |
254 NOTREACHED(); | 254 NOTREACHED(); |
255 #endif | 255 #endif |
256 } | 256 } |
257 } | 257 } |
258 | 258 |
259 // static | 259 // static |
260 void ExtensionInstallUI::DisableFailureUIForTests() { | 260 void ExtensionInstallUI::DisableFailureUIForTests() { |
261 disable_failure_ui_for_tests = true; | 261 disable_failure_ui_for_tests = true; |
262 } | 262 } |
OLD | NEW |