| 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/memory/singleton.h" | 6 #include "base/memory/singleton.h" |
| 7 #include "chrome/browser/ui/app_list/app_list_service.h" | 7 #include "chrome/browser/ui/app_list/app_list_service.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| 11 class AppListServiceDisabled : public AppListService { | 11 class AppListServiceDisabled : public AppListService { |
| 12 public: | 12 public: |
| 13 static AppListServiceDisabled* GetInstance() { | 13 static AppListServiceDisabled* GetInstance() { |
| 14 return Singleton<AppListServiceDisabled, | 14 return Singleton<AppListServiceDisabled, |
| 15 LeakySingletonTraits<AppListServiceDisabled> >::get(); | 15 LeakySingletonTraits<AppListServiceDisabled> >::get(); |
| 16 } | 16 } |
| 17 | 17 |
| 18 private: | 18 private: |
| 19 friend struct DefaultSingletonTraits<AppListServiceDisabled>; | 19 friend struct DefaultSingletonTraits<AppListServiceDisabled>; |
| 20 | 20 |
| 21 AppListServiceDisabled() {} | 21 AppListServiceDisabled() {} |
| 22 | 22 |
| 23 // AppListService overrides: | 23 // AppListService overrides: |
| 24 virtual void Init(Profile* initial_profile) OVERRIDE {} | 24 virtual void Init(Profile* initial_profile) OVERRIDE {} |
| 25 | 25 |
| 26 virtual base::FilePath GetProfilePath( | 26 virtual base::FilePath GetProfilePath( |
| 27 const base::FilePath& user_data_dir) OVERRIDE { | 27 const base::FilePath& user_data_dir) OVERRIDE { |
| 28 return base::FilePath(); | 28 return base::FilePath(); |
| 29 } | 29 } |
| 30 virtual void SetProfilePath(const base::FilePath& profile_path) OVERRIDE {} |
| 30 | 31 |
| 31 virtual void ShowForSavedProfile() OVERRIDE {} | 32 virtual void ShowForSavedProfile() OVERRIDE {} |
| 32 virtual void ShowAppList(Profile* profile) OVERRIDE {} | 33 virtual void ShowAppList(Profile* profile) OVERRIDE {} |
| 33 virtual void DismissAppList() OVERRIDE {} | 34 virtual void DismissAppList() OVERRIDE {} |
| 34 | 35 |
| 35 virtual void SetAppListProfile( | |
| 36 const base::FilePath& profile_file_path) OVERRIDE {} | |
| 37 | |
| 38 virtual Profile* GetCurrentAppListProfile() OVERRIDE { return NULL; } | 36 virtual Profile* GetCurrentAppListProfile() OVERRIDE { return NULL; } |
| 39 virtual bool IsAppListVisible() const OVERRIDE { return false; } | 37 virtual bool IsAppListVisible() const OVERRIDE { return false; } |
| 40 virtual void EnableAppList() OVERRIDE {} | 38 virtual void EnableAppList(Profile* initial_profile) OVERRIDE {} |
| 41 | 39 |
| 42 virtual AppListControllerDelegate* CreateControllerDelegate() OVERRIDE { | 40 virtual AppListControllerDelegate* CreateControllerDelegate() OVERRIDE { |
| 43 return NULL; | 41 return NULL; |
| 44 } | 42 } |
| 45 | 43 |
| 46 virtual gfx::NativeWindow GetAppListWindow() OVERRIDE { | 44 virtual gfx::NativeWindow GetAppListWindow() OVERRIDE { |
| 47 return NULL; | 45 return NULL; |
| 48 } | 46 } |
| 49 | 47 |
| 50 DISALLOW_COPY_AND_ASSIGN(AppListServiceDisabled); | 48 DISALLOW_COPY_AND_ASSIGN(AppListServiceDisabled); |
| 51 }; | 49 }; |
| 52 | 50 |
| 53 } // namespace | 51 } // namespace |
| 54 | 52 |
| 55 // static | 53 // static |
| 56 AppListService* AppListService::Get() { | 54 AppListService* AppListService::Get() { |
| 57 return AppListServiceDisabled::GetInstance(); | 55 return AppListServiceDisabled::GetInstance(); |
| 58 } | 56 } |
| 59 | 57 |
| 60 // static | 58 // static |
| 61 void AppListService::InitAll(Profile* initial_profile) {} | 59 void AppListService::InitAll(Profile* initial_profile) {} |
| 62 | 60 |
| 63 // static | 61 // static |
| 64 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {} | 62 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {} |
| 65 | 63 |
| 66 // static | 64 // static |
| 67 void AppListService::RecordShowTimings(const CommandLine& command_line) {} | 65 void AppListService::RecordShowTimings(const CommandLine& command_line) {} |
| OLD | NEW |