Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "chrome/browser/ui/app_list/app_list_service.h" | 8 #include "chrome/browser/ui/app_list/app_list_service.h" |
| 9 #include "chrome/browser/ui/browser.h" | |
|
tapted
2016/05/18 03:58:27
bleh all this should be #if defined(TOOLKIT_VIEWS)
| |
| 10 #include "chrome/browser/ui/browser_finder.h" | |
| 11 #include "chrome/browser/ui/browser_navigator.h" | |
| 12 #include "chrome/browser/ui/browser_navigator_params.h" | |
| 13 #include "chrome/common/chrome_switches.h" | |
| 14 #include "ui/base/page_transition_types.h" | |
|
tapted
2016/05/18 03:17:04
looks like you also need
#include "base/command_l
| |
| 9 | 15 |
| 10 namespace { | 16 namespace { |
| 11 | 17 |
| 12 class AppListServiceDisabled : public AppListService { | 18 class AppListServiceDisabled : public AppListService { |
| 13 public: | 19 public: |
| 14 static AppListServiceDisabled* GetInstance() { | 20 static AppListServiceDisabled* GetInstance() { |
| 15 return base::Singleton< | 21 return base::Singleton< |
| 16 AppListServiceDisabled, | 22 AppListServiceDisabled, |
| 17 base::LeakySingletonTraits<AppListServiceDisabled>>::get(); | 23 base::LeakySingletonTraits<AppListServiceDisabled>>::get(); |
| 18 } | 24 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 void AppListService::InitAll(Profile* initial_profile, | 74 void AppListService::InitAll(Profile* initial_profile, |
| 69 const base::FilePath& profile_path) {} | 75 const base::FilePath& profile_path) {} |
| 70 | 76 |
| 71 // static | 77 // static |
| 72 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {} | 78 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {} |
| 73 | 79 |
| 74 // static | 80 // static |
| 75 bool AppListService::HandleLaunchCommandLine( | 81 bool AppListService::HandleLaunchCommandLine( |
| 76 const base::CommandLine& command_line, | 82 const base::CommandLine& command_line, |
| 77 Profile* launch_profile) { | 83 Profile* launch_profile) { |
| 78 return false; | 84 if (!command_line.HasSwitch(switches::kShowAppList)) |
| 85 return false; | |
| 86 | |
| 87 Browser* browser = chrome::FindLastActive(); | |
| 88 | |
| 89 chrome::NavigateParams params(browser ? browser->profile() : launch_profile, | |
| 90 GURL(chrome::kChromeUIAppsURL), | |
| 91 ui::PAGE_TRANSITION_AUTO_BOOKMARK); | |
| 92 chrome::Navigate(¶ms); | |
| 93 return true; | |
| 79 } | 94 } |
| OLD | NEW |