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

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

Issue 7776001: ntp4: improved app install, try 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix trash change Created 9 years, 4 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) 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 default: 225 default:
226 NOTREACHED() << "Unknown message"; 226 NOTREACHED() << "Unknown message";
227 break; 227 break;
228 } 228 }
229 } 229 }
230 230
231 // static 231 // static
232 void ExtensionInstallUI::OpenAppInstalledNTP(Browser* browser, 232 void ExtensionInstallUI::OpenAppInstalledNTP(Browser* browser,
233 const std::string& app_id) { 233 const std::string& app_id) {
234 std::string url = base::StringPrintf( 234 std::string url = base::StringPrintf(
235 "%s#app-id=%s", chrome::kChromeUINewTabURL, app_id.c_str()); 235 "%s#app-id=%s", chrome::kChromeUINewTabURL, app_id.c_str());
Rick Byers 2011/08/29 16:01:00 Why do you still need the code for setting and rea
Evan Stade 2011/08/29 18:15:16 hmm. I tried to do what you're suggesting and it d
236 browser::NavigateParams params = 236 browser::NavigateParams params =
237 browser->GetSingletonTabNavigateParams(GURL(url)); 237 browser->GetSingletonTabNavigateParams(GURL(url));
238 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
239 browser::Navigate(&params); 238 browser::Navigate(&params);
239
240 NotificationService::current()->Notify(
241 chrome::NOTIFICATION_APP_INSTALLED_TO_NTP,
242 Source<TabContents>(params.target_contents->tab_contents()),
243 Details<const std::string>(&app_id));
240 } 244 }
241 245
242 // static 246 // static
243 void ExtensionInstallUI::DisableFailureUIForTests() { 247 void ExtensionInstallUI::DisableFailureUIForTests() {
244 disable_failure_ui_for_tests = true; 248 disable_failure_ui_for_tests = true;
245 } 249 }
246 250
247 void ExtensionInstallUI::ShowThemeInfoBar(const std::string& previous_theme_id, 251 void ExtensionInstallUI::ShowThemeInfoBar(const std::string& previous_theme_id,
248 bool previous_using_native_theme, 252 bool previous_using_native_theme,
249 const Extension* new_theme, 253 const Extension* new_theme,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 305
302 InfoBarDelegate* ExtensionInstallUI::GetNewThemeInstalledInfoBarDelegate( 306 InfoBarDelegate* ExtensionInstallUI::GetNewThemeInstalledInfoBarDelegate(
303 TabContents* tab_contents, 307 TabContents* tab_contents,
304 const Extension* new_theme, 308 const Extension* new_theme,
305 const std::string& previous_theme_id, 309 const std::string& previous_theme_id,
306 bool previous_using_native_theme) { 310 bool previous_using_native_theme) {
307 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, 311 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme,
308 previous_theme_id, 312 previous_theme_id,
309 previous_using_native_theme); 313 previous_using_native_theme);
310 } 314 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698