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 virtual void SetAppListNextPaintCallback(void (*callback
)()) override
{}
25 virtual void HandleFirstRun() override
{}
26 virtual void Init(Profile
* initial_profile
) override
{}
28 virtual base::FilePath
GetProfilePath(
29 const base::FilePath
& user_data_dir
) override
{
30 return base::FilePath();
32 virtual void SetProfilePath(const base::FilePath
& profile_path
) override
{}
34 virtual void Show() override
{}
35 virtual void ShowForProfile(Profile
* profile
) override
{}
36 virtual void ShowForVoiceSearch(Profile
* profile
) override
{}
37 virtual void ShowForAppInstall(Profile
* profile
,
38 const std::string
& extension_id
,
39 bool start_discovery_tracking
) override
{}
40 virtual void DismissAppList() override
{}
42 virtual Profile
* GetCurrentAppListProfile() override
{ return NULL
; }
43 virtual bool IsAppListVisible() const override
{ return false; }
44 virtual void EnableAppList(Profile
* initial_profile
,
45 AppListEnableSource enable_source
) override
{}
46 virtual gfx::NativeWindow
GetAppListWindow() override
{ return NULL
; }
47 virtual AppListControllerDelegate
* GetControllerDelegate() override
{
50 virtual void CreateShortcut() override
{}
52 DISALLOW_COPY_AND_ASSIGN(AppListServiceDisabled
);
58 AppListService
* AppListService::Get(chrome::HostDesktopType desktop_type
) {
59 return AppListServiceDisabled::GetInstance();
63 void AppListService::InitAll(Profile
* initial_profile
) {}
66 void AppListService::RegisterPrefs(PrefRegistrySimple
* registry
) {}
69 bool AppListService::HandleLaunchCommandLine(
70 const base::CommandLine
& command_line
,
71 Profile
* launch_profile
) {