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

Unified Diff: chrome/browser/ui/app_list/app_list_service_disabled.cc

Issue 1973203002: Make --show-app-list go to the chrome://apps page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/app_list_service_disabled.cc
diff --git a/chrome/browser/ui/app_list/app_list_service_disabled.cc b/chrome/browser/ui/app_list/app_list_service_disabled.cc
index a54dd7e9a21631abb7fb0b4c6714e0ac89cb5be9..676c71928cd5d4ac1582598965661769a5bbc749 100644
--- a/chrome/browser/ui/app_list/app_list_service_disabled.cc
+++ b/chrome/browser/ui/app_list/app_list_service_disabled.cc
@@ -6,6 +6,12 @@
#include "base/macros.h"
#include "base/memory/singleton.h"
#include "chrome/browser/ui/app_list/app_list_service.h"
+#include "chrome/browser/ui/browser.h"
tapted 2016/05/18 03:58:27 bleh all this should be #if defined(TOOLKIT_VIEWS)
+#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_navigator.h"
+#include "chrome/browser/ui/browser_navigator_params.h"
+#include "chrome/common/chrome_switches.h"
+#include "ui/base/page_transition_types.h"
tapted 2016/05/18 03:17:04 looks like you also need #include "base/command_l
namespace {
@@ -75,5 +81,14 @@ void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {}
bool AppListService::HandleLaunchCommandLine(
const base::CommandLine& command_line,
Profile* launch_profile) {
- return false;
+ if (!command_line.HasSwitch(switches::kShowAppList))
+ return false;
+
+ Browser* browser = chrome::FindLastActive();
+
+ chrome::NavigateParams params(browser ? browser->profile() : launch_profile,
+ GURL(chrome::kChromeUIAppsURL),
+ ui::PAGE_TRANSITION_AUTO_BOOKMARK);
+ chrome::Navigate(&params);
+ return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698