| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_ | 6 #define CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "chrome/browser/ui/app_list/app_list_service_impl.h" | 11 #include "chrome/browser/ui/app_list/app_list_service_impl.h" |
| 12 #include "ui/app_list/app_list_model.h" | 12 #include "ui/app_list/app_list_model.h" |
| 13 | 13 |
| 14 namespace app_list { | 14 namespace app_list { |
| 15 class AppListShower; | 15 class AppListPresenter; |
| 16 class AppListShowerImpl; | 16 class AppListPresenterImpl; |
| 17 class AppListShowerDelegateFactory; | 17 class AppListPresenterDelegateFactory; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace base { | 20 namespace base { |
| 21 template <typename T> struct DefaultSingletonTraits; | 21 template <typename T> struct DefaultSingletonTraits; |
| 22 } | 22 } |
| 23 | 23 |
| 24 class AppListControllerDelegateAsh; | 24 class AppListControllerDelegateAsh; |
| 25 | 25 |
| 26 // AppListServiceAsh wraps functionality in ChromeLauncherController and the Ash | 26 // AppListServiceAsh wraps functionality in ChromeLauncherController and the Ash |
| 27 // Shell for showing and hiding the app list on the Ash desktop. | 27 // Shell for showing and hiding the app list on the Ash desktop. |
| 28 class AppListServiceAsh : public AppListServiceImpl { | 28 class AppListServiceAsh : public AppListServiceImpl { |
| 29 public: | 29 public: |
| 30 static AppListServiceAsh* GetInstance(); | 30 static AppListServiceAsh* GetInstance(); |
| 31 | 31 |
| 32 app_list::AppListShower* GetAppListShower(); | 32 app_list::AppListPresenter* GetAppListPresenter(); |
| 33 | 33 |
| 34 // AppListService overrides: | 34 // AppListService overrides: |
| 35 void Init(Profile* initial_profile) override; | 35 void Init(Profile* initial_profile) override; |
| 36 | 36 |
| 37 // ProfileAttributesStorage::Observer overrides: | 37 // ProfileAttributesStorage::Observer overrides: |
| 38 // On ChromeOS this should never happen. On other platforms, there is always a | 38 // On ChromeOS this should never happen. On other platforms, there is always a |
| 39 // Non-ash AppListService that is responsible for handling this. | 39 // Non-ash AppListService that is responsible for handling this. |
| 40 // TODO(calamity): Ash shouldn't observe the ProfileAttributesStorage at all. | 40 // TODO(calamity): Ash shouldn't observe the ProfileAttributesStorage at all. |
| 41 void OnProfileWillBeRemoved(const base::FilePath& profile_path) override; | 41 void OnProfileWillBeRemoved(const base::FilePath& profile_path) override; |
| 42 | 42 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 64 void EnableAppList(Profile* initial_profile, | 64 void EnableAppList(Profile* initial_profile, |
| 65 AppListEnableSource enable_source) override; | 65 AppListEnableSource enable_source) override; |
| 66 gfx::NativeWindow GetAppListWindow() override; | 66 gfx::NativeWindow GetAppListWindow() override; |
| 67 Profile* GetCurrentAppListProfile() override; | 67 Profile* GetCurrentAppListProfile() override; |
| 68 AppListControllerDelegate* GetControllerDelegate() override; | 68 AppListControllerDelegate* GetControllerDelegate() override; |
| 69 | 69 |
| 70 // ApplistServiceImpl overrides: | 70 // ApplistServiceImpl overrides: |
| 71 void CreateForProfile(Profile* default_profile) override; | 71 void CreateForProfile(Profile* default_profile) override; |
| 72 void DestroyAppList() override; | 72 void DestroyAppList() override; |
| 73 | 73 |
| 74 std::unique_ptr<app_list::AppListShowerDelegateFactory> | 74 std::unique_ptr<app_list::AppListPresenterDelegateFactory> |
| 75 shower_delegate_factory_; | 75 presenter_delegate_factory_; |
| 76 std::unique_ptr<app_list::AppListShowerImpl> app_list_shower_; | 76 std::unique_ptr<app_list::AppListPresenterImpl> app_list_presenter_; |
| 77 std::unique_ptr<AppListControllerDelegateAsh> controller_delegate_; | 77 std::unique_ptr<AppListControllerDelegateAsh> controller_delegate_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(AppListServiceAsh); | 79 DISALLOW_COPY_AND_ASSIGN(AppListServiceAsh); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 #endif // CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_ | 82 #endif // CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_ |
| OLD | NEW |