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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" | 10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 if (extension->is_app()) { | 182 if (extension->is_app()) { |
183 bool use_bubble = false; | 183 bool use_bubble = false; |
184 | 184 |
185 #if defined(TOOLKIT_VIEWS) | 185 #if defined(TOOLKIT_VIEWS) |
186 CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 186 CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
187 use_bubble = (use_app_installed_bubble_ || | 187 use_bubble = (use_app_installed_bubble_ || |
188 cmdline->HasSwitch(switches::kAppsNewInstallBubble)); | 188 cmdline->HasSwitch(switches::kAppsNewInstallBubble)); |
189 #endif | 189 #endif |
190 | 190 |
191 extensions::GetIsAppLauncherEnabled( | 191 extensions::UpdateIsAppLauncherEnabled( |
192 base::Bind(&OnAppLauncherEnabledCompleted, extension, browser, icon, | 192 base::Bind(&OnAppLauncherEnabledCompleted, extension, browser, icon, |
193 use_bubble)); | 193 use_bubble)); |
194 return; | 194 return; |
195 } | 195 } |
196 | 196 |
197 chrome::ShowExtensionInstalledBubble(extension, browser, *icon); | 197 chrome::ShowExtensionInstalledBubble(extension, browser, *icon); |
198 } | 198 } |
199 | 199 |
200 void ExtensionInstallUIDefault::OnInstallFailure( | 200 void ExtensionInstallUIDefault::OnInstallFailure( |
201 const extensions::CrxInstallerError& error) { | 201 const extensions::CrxInstallerError& error) { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 return new ExtensionInstallPrompt(web_contents); | 261 return new ExtensionInstallPrompt(web_contents); |
262 } | 262 } |
263 | 263 |
264 // static | 264 // static |
265 ExtensionInstallPrompt* ExtensionInstallUI::CreateInstallPromptWithProfile( | 265 ExtensionInstallPrompt* ExtensionInstallUI::CreateInstallPromptWithProfile( |
266 Profile* profile) { | 266 Profile* profile) { |
267 Browser* browser = chrome::FindLastActiveWithProfile(profile, | 267 Browser* browser = chrome::FindLastActiveWithProfile(profile, |
268 chrome::GetActiveDesktop()); | 268 chrome::GetActiveDesktop()); |
269 return CreateInstallPromptWithBrowser(browser); | 269 return CreateInstallPromptWithBrowser(browser); |
270 } | 270 } |
OLD | NEW |