Chromium Code Reviews| 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(¶ms); |
| + return true; |
| } |