Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / app_list / app_list_service_disabled.cc
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.
4
5 #include "base/files/file_path.h"
6 #include "base/memory/singleton.h"
7 #include "chrome/browser/ui/app_list/app_list_service.h"
8
9 namespace {
10
11 class AppListServiceDisabled : public AppListService {
12  public:
13   static AppListServiceDisabled* GetInstance() {
14     return Singleton<AppListServiceDisabled,
15                      LeakySingletonTraits<AppListServiceDisabled> >::get();
16   }
17
18  private:
19   friend struct DefaultSingletonTraits<AppListServiceDisabled>;
20
21   AppListServiceDisabled() {}
22
23   // AppListService overrides:
24   virtual void SetAppListNextPaintCallback(void (*callback)()) override {}
25   virtual void HandleFirstRun() override {}
26   virtual void Init(Profile* initial_profile) override {}
27
28   virtual base::FilePath GetProfilePath(
29       const base::FilePath& user_data_dir) override {
30     return base::FilePath();
31   }
32   virtual void SetProfilePath(const base::FilePath& profile_path) override {}
33
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 {}
41
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 {
48     return NULL;
49   }
50   virtual void CreateShortcut() override {}
51
52   DISALLOW_COPY_AND_ASSIGN(AppListServiceDisabled);
53 };
54
55 }  // namespace
56
57 // static
58 AppListService* AppListService::Get(chrome::HostDesktopType desktop_type) {
59   return AppListServiceDisabled::GetInstance();
60 }
61
62 // static
63 void AppListService::InitAll(Profile* initial_profile) {}
64
65 // static
66 void AppListService::RegisterPrefs(PrefRegistrySimple* registry) {}
67
68 // static
69 bool AppListService::HandleLaunchCommandLine(
70     const base::CommandLine& command_line,
71     Profile* launch_profile) {
72   return false;
73 }