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 SetAppListNextPaintCallback(void (*callback)()) OVERRIDE {} | 24 virtual void SetAppListNextPaintCallback(void (*callback)()) override {} |
25 virtual void HandleFirstRun() OVERRIDE {} | 25 virtual void HandleFirstRun() override {} |
26 virtual void Init(Profile* initial_profile) OVERRIDE {} | 26 virtual void Init(Profile* initial_profile) override {} |
27 | 27 |
28 virtual base::FilePath GetProfilePath( | 28 virtual base::FilePath GetProfilePath( |
29 const base::FilePath& user_data_dir) OVERRIDE { | 29 const base::FilePath& user_data_dir) override { |
30 return base::FilePath(); | 30 return base::FilePath(); |
31 } | 31 } |
32 virtual void SetProfilePath(const base::FilePath& profile_path) OVERRIDE {} | 32 virtual void SetProfilePath(const base::FilePath& profile_path) override {} |
33 | 33 |
34 virtual void Show() OVERRIDE {} | 34 virtual void Show() override {} |
35 virtual void CreateForProfile(Profile* profile) OVERRIDE {} | 35 virtual void CreateForProfile(Profile* profile) override {} |
36 virtual void ShowForProfile(Profile* profile) OVERRIDE {} | 36 virtual void ShowForProfile(Profile* profile) override {} |
37 virtual void AutoShowForProfile(Profile* profile) OVERRIDE {} | 37 virtual void AutoShowForProfile(Profile* profile) override {} |
38 virtual void DismissAppList() OVERRIDE {} | 38 virtual void DismissAppList() override {} |
39 | 39 |
40 virtual Profile* GetCurrentAppListProfile() OVERRIDE { return NULL; } | 40 virtual Profile* GetCurrentAppListProfile() override { return NULL; } |
41 virtual bool IsAppListVisible() const OVERRIDE { return false; } | 41 virtual bool IsAppListVisible() const override { return false; } |
42 virtual void EnableAppList(Profile* initial_profile, | 42 virtual void EnableAppList(Profile* initial_profile, |
43 AppListEnableSource enable_source) OVERRIDE {} | 43 AppListEnableSource enable_source) override {} |
44 virtual AppListControllerDelegate* GetControllerDelegate() OVERRIDE { | 44 virtual AppListControllerDelegate* GetControllerDelegate() override { |
45 return NULL; | 45 return NULL; |
46 } | 46 } |
47 | 47 |
48 virtual void CreateShortcut() OVERRIDE {} | 48 virtual void CreateShortcut() override {} |
49 | 49 |
50 virtual gfx::NativeWindow GetAppListWindow() OVERRIDE { | 50 virtual gfx::NativeWindow GetAppListWindow() override { |
51 return NULL; | 51 return NULL; |
52 } | 52 } |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(AppListServiceDisabled); | 54 DISALLOW_COPY_AND_ASSIGN(AppListServiceDisabled); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace | 57 } // namespace |
58 | 58 |
59 // static | 59 // static |
60 AppListService* AppListService::Get(chrome::HostDesktopType desktop_type) { | 60 AppListService* AppListService::Get(chrome::HostDesktopType desktop_type) { |
61 return AppListServiceDisabled::GetInstance(); | 61 return AppListServiceDisabled::GetInstance(); |
62 } | 62 } |
63 | 63 |
64 // static | 64 // static |
65 void AppListService::InitAll(Profile* initial_profile) {} | 65 void AppListService::InitAll(Profile* initial_profile) {} |
66 | 66 |
67 // static | 67 // static |
68 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {} | 68 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {} |
69 | 69 |
70 // static | 70 // static |
71 bool AppListService::HandleLaunchCommandLine( | 71 bool AppListService::HandleLaunchCommandLine( |
72 const base::CommandLine& command_line, | 72 const base::CommandLine& command_line, |
73 Profile* launch_profile) { | 73 Profile* launch_profile) { |
74 return false; | 74 return false; |
75 } | 75 } |
OLD | NEW |