| Index: chrome/browser/extensions/extension_install_ui.cc
|
| diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc
|
| index fbf692e4a847b59cd46909d7b8e203d8c91d1283..0717acd7bedda56e47625d2acced774b713bce99 100644
|
| --- a/chrome/browser/extensions/extension_install_ui.cc
|
| +++ b/chrome/browser/extensions/extension_install_ui.cc
|
| @@ -22,6 +22,7 @@
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_dialogs.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| +#include "chrome/browser/ui/browser_navigator.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| @@ -73,26 +74,6 @@ namespace {
|
| // Size of extension icon in top left of dialog.
|
| const int kIconSize = 69;
|
|
|
| -// Shows the application install animation on the new tab page for the app
|
| -// with |app_id|. If a NTP already exists on the active |browser|, this will
|
| -// select that tab and show the animation there. Otherwise, it will create
|
| -// a new NTP.
|
| -void ShowAppInstalledAnimation(Browser* browser, const std::string& app_id) {
|
| - // Select an already open NTP, if there is one. Existing NTPs will
|
| - // automatically show the install animation for any new apps.
|
| - for (int i = 0; i < browser->tab_count(); ++i) {
|
| - GURL url = browser->GetTabContentsAt(i)->GetURL();
|
| - if (url.SchemeIs(chrome::kChromeUIScheme) &&
|
| - url.host() == chrome::kChromeUINewTabHost) {
|
| - browser->ActivateTabAt(i, false);
|
| - return;
|
| - }
|
| - }
|
| -
|
| - // If there isn't an NTP, open one.
|
| - ExtensionInstallUI::OpenAppInstalledNTP(browser, app_id);
|
| -}
|
| -
|
| } // namespace
|
|
|
| ExtensionInstallUI::ExtensionInstallUI(Profile* profile)
|
| @@ -186,7 +167,7 @@ void ExtensionInstallUI::OnInstallSuccess(const Extension* extension,
|
| #endif
|
|
|
| if (extension->is_app() && !use_bubble_for_apps) {
|
| - ShowAppInstalledAnimation(browser, extension->id());
|
| + ExtensionInstallUI::OpenAppInstalledNTP(browser, extension->id());
|
| return;
|
| }
|
|
|
| @@ -252,7 +233,10 @@ void ExtensionInstallUI::OpenAppInstalledNTP(Browser* browser,
|
| const std::string& app_id) {
|
| std::string url = base::StringPrintf(
|
| "%s#app-id=%s", chrome::kChromeUINewTabURL, app_id.c_str());
|
| - browser->AddSelectedTabWithURL(GURL(url), PageTransition::TYPED);
|
| + browser::NavigateParams params =
|
| + browser->GetSingletonTabNavigateParams(GURL(url));
|
| + params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
|
| + browser::Navigate(¶ms);
|
| }
|
|
|
| // static
|
|
|