Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / ui / app_list / app_list_service_disabled.cc
blobcdb4f4ed6b55ae47a9ebf469dc7138d8ee1fb25e
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"
9 namespace {
11 class AppListServiceDisabled : public AppListService {
12 public:
13 static AppListServiceDisabled* GetInstance() {
14 return base::Singleton<
15 AppListServiceDisabled,
16 base::LeakySingletonTraits<AppListServiceDisabled>>::get();
19 private:
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(
36 Profile* profile,
37 const scoped_refptr<content::SpeechRecognitionSessionPreamble>& preamble)
38 override {}
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 {
52 return nullptr;
54 void CreateShortcut() override {}
56 DISALLOW_COPY_AND_ASSIGN(AppListServiceDisabled);
59 } // namespace
61 // static
62 AppListService* AppListService::Get(chrome::HostDesktopType desktop_type) {
63 return AppListServiceDisabled::GetInstance();
66 // static
67 void AppListService::InitAll(Profile* initial_profile,
68 const base::FilePath& profile_path) {}
70 // static
71 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {}
73 // static
74 bool AppListService::HandleLaunchCommandLine(
75 const base::CommandLine& command_line,
76 Profile* launch_profile) {
77 return false;