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

Unified Diff: chrome/browser/ui/ash/app_list/extension_app_item.cc

Issue 10825317: Convert banned calls to use Navigate in ash app list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/ash/app_list/search_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/app_list/extension_app_item.cc
diff --git a/chrome/browser/ui/ash/app_list/extension_app_item.cc b/chrome/browser/ui/ash/app_list/extension_app_item.cc
index eb933c234ec691aaac2a820a526567d07d20f4b8..34d787737db5365f202182cecd0747da445770fa 100644
--- a/chrome/browser/ui/ash/app_list/extension_app_item.cc
+++ b/chrome/browser/ui/ash/app_list/extension_app_item.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/ui/ash/extension_utils.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/common/extensions/extension.h"
@@ -167,16 +167,10 @@ void ExtensionAppItem::ShowExtensionOptions() {
if (!extension)
return;
- // TODO(beng): use Navigate()!
- Browser* browser = browser::FindLastActiveWithProfile(profile_);
- if (!browser) {
- browser = new Browser(Browser::CreateParams(profile_));
- browser->window()->Show();
- }
-
- chrome::AddSelectedTabWithURL(browser, extension->options_url(),
+ chrome::NavigateParams params(profile_,
+ extension->options_url(),
content::PAGE_TRANSITION_LINK);
- browser->window()->Activate();
+ chrome::Navigate(&params);
}
void ExtensionAppItem::StartExtensionUninstall() {
« no previous file with comments | « no previous file | chrome/browser/ui/ash/app_list/search_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698