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
3 // found in the LICENSE file.
5 #include "base/files/file_path.h"
6 #include "base/memory/singleton.h"
7 #include "chrome/browser/ui/app_list/app_list_service.h"
11 class AppListServiceDisabled
: public AppListService
{
13 static AppListServiceDisabled
* GetInstance() {
14 return Singleton
<AppListServiceDisabled
,
15 LeakySingletonTraits
<AppListServiceDisabled
> >::get();
19 friend struct DefaultSingletonTraits
<AppListServiceDisabled
>;
21 AppListServiceDisabled() {}
23 // AppListService overrides:
24 void SetAppListNextPaintCallback(void (*callback
)()) override
{}
25 void Init(Profile
* initial_profile
) override
{}
27 base::FilePath
GetProfilePath(const base::FilePath
& user_data_dir
) override
{
28 return base::FilePath();
30 void SetProfilePath(const base::FilePath
& profile_path
) override
{}
32 void Show() override
{}
33 void ShowForProfile(Profile
* profile
) override
{}
34 void ShowForVoiceSearch(
36 const scoped_refptr
<content::SpeechRecognitionSessionPreamble
>& preamble
)
38 void HideCustomLauncherPage() override
{}
39 void ShowForAppInstall(Profile
* profile
,
40 const std::string
& extension_id
,
41 bool start_discovery_tracking
) override
{}
42 void DismissAppList() override
{}
43 void ShowForCustomLauncherPage(Profile
* profile
) override
{}
45 Profile
* GetCurrentAppListProfile() override
{ return nullptr; }
46 bool IsAppListVisible() const override
{ return false; }
47 void EnableAppList(Profile
* initial_profile
,
48 AppListEnableSource enable_source
) override
{}
49 gfx::NativeWindow
GetAppListWindow() override
{ return nullptr; }
50 AppListControllerDelegate
* GetControllerDelegate() override
{
53 void CreateShortcut() override
{}
55 DISALLOW_COPY_AND_ASSIGN(AppListServiceDisabled
);
61 AppListService
* AppListService::Get(chrome::HostDesktopType desktop_type
) {
62 return AppListServiceDisabled::GetInstance();
66 void AppListService::InitAll(Profile
* initial_profile
,
67 const base::FilePath
& profile_path
) {}
70 void AppListService::RegisterPrefs(PrefRegistrySimple
* registry
) {}
73 bool AppListService::HandleLaunchCommandLine(
74 const base::CommandLine
& command_line
,
75 Profile
* launch_profile
) {