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 CreateForProfile(Profile
* profile
) OVERRIDE
{}
36 virtual void ShowForProfile(Profile
* profile
) OVERRIDE
{}
37 virtual void DismissAppList() OVERRIDE
{}
39 virtual Profile
* GetCurrentAppListProfile() OVERRIDE
{ return NULL
; }
40 virtual bool IsAppListVisible() const OVERRIDE
{ return false; }
41 virtual void EnableAppList(Profile
* initial_profile
) OVERRIDE
{}
43 virtual AppListControllerDelegate
* GetControllerDelegate() OVERRIDE
{
47 virtual gfx::NativeWindow
GetAppListWindow() OVERRIDE
{
51 DISALLOW_COPY_AND_ASSIGN(AppListServiceDisabled
);
57 AppListService
* AppListService::Get(chrome::HostDesktopType desktop_type
) {
58 return AppListServiceDisabled::GetInstance();
62 void AppListService::InitAll(Profile
* initial_profile
) {}
65 void AppListService::RegisterPrefs(PrefRegistrySimple
* registry
) {}
68 void AppListService::RecordShowTimings(const CommandLine
& command_line
) {}