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 base::Singleton
<
15 AppListServiceDisabled
,
16 base::LeakySingletonTraits
<AppListServiceDisabled
>>::get();
20 friend struct base::DefaultSingletonTraits
<AppListServiceDisabled
>;
22 AppListServiceDisabled() {}
24 // AppListService overrides:
25 void SetAppListNextPaintCallback(void (*callback
)()) override
{}
26 void Init(Profile
* initial_profile
) override
{}
28 base::FilePath
GetProfilePath(const base::FilePath
& user_data_dir
) override
{
29 return base::FilePath();
31 void SetProfilePath(const base::FilePath
& profile_path
) override
{}
33 void Show() override
{}
34 void ShowForProfile(Profile
* profile
) override
{}
35 void ShowForVoiceSearch(
37 const scoped_refptr
<content::SpeechRecognitionSessionPreamble
>& preamble
)
39 void HideCustomLauncherPage() override
{}
40 void ShowForAppInstall(Profile
* profile
,
41 const std::string
& extension_id
,
42 bool start_discovery_tracking
) override
{}
43 void DismissAppList() override
{}
44 void ShowForCustomLauncherPage(Profile
* profile
) override
{}
46 Profile
* GetCurrentAppListProfile() override
{ return nullptr; }
47 bool IsAppListVisible() const override
{ return false; }
48 void EnableAppList(Profile
* initial_profile
,
49 AppListEnableSource enable_source
) override
{}
50 gfx::NativeWindow
GetAppListWindow() override
{ return nullptr; }
51 AppListControllerDelegate
* GetControllerDelegate() override
{
54 void CreateShortcut() override
{}
56 DISALLOW_COPY_AND_ASSIGN(AppListServiceDisabled
);
62 AppListService
* AppListService::Get(chrome::HostDesktopType desktop_type
) {
63 return AppListServiceDisabled::GetInstance();
67 void AppListService::InitAll(Profile
* initial_profile
,
68 const base::FilePath
& profile_path
) {}
71 void AppListService::RegisterPrefs(PrefRegistrySimple
* registry
) {}
74 bool AppListService::HandleLaunchCommandLine(
75 const base::CommandLine
& command_line
,
76 Profile
* launch_profile
) {