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 #ifndef CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_SERVICE_LINUX_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_SERVICE_LINUX_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_SERVICE_LINUX_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_SERVICE_LINUX_H_ |
7 | 7 |
8 #include "chrome/browser/ui/app_list/app_list_service_views.h" | 8 #include "chrome/browser/ui/app_list/app_list_service_views.h" |
9 #include "ui/app_list/views/app_list_view_observer.h" | 9 #include "ui/app_list/views/app_list_view_observer.h" |
10 | 10 |
| 11 namespace base { |
11 template <typename T> struct DefaultSingletonTraits; | 12 template <typename T> struct DefaultSingletonTraits; |
| 13 } |
12 | 14 |
13 // AppListServiceLinux manages global resources needed for the app list to | 15 // AppListServiceLinux manages global resources needed for the app list to |
14 // operate, and controls when the app list is opened and closed. | 16 // operate, and controls when the app list is opened and closed. |
15 class AppListServiceLinux : public AppListServiceViews, | 17 class AppListServiceLinux : public AppListServiceViews, |
16 public app_list::AppListViewObserver { | 18 public app_list::AppListViewObserver { |
17 public: | 19 public: |
18 ~AppListServiceLinux() override; | 20 ~AppListServiceLinux() override; |
19 | 21 |
20 static AppListServiceLinux* GetInstance(); | 22 static AppListServiceLinux* GetInstance(); |
21 | 23 |
22 // AppListService overrides: | 24 // AppListService overrides: |
23 void CreateShortcut() override; | 25 void CreateShortcut() override; |
24 | 26 |
25 // app_list::AppListViewObserver overrides: | 27 // app_list::AppListViewObserver overrides: |
26 void OnActivationChanged(views::Widget* widget, bool active) override; | 28 void OnActivationChanged(views::Widget* widget, bool active) override; |
27 | 29 |
28 private: | 30 private: |
29 friend struct DefaultSingletonTraits<AppListServiceLinux>; | 31 friend struct base::DefaultSingletonTraits<AppListServiceLinux>; |
30 | 32 |
31 // AppListShowerDelegate overrides: | 33 // AppListShowerDelegate overrides: |
32 void OnViewCreated() override; | 34 void OnViewCreated() override; |
33 void OnViewBeingDestroyed() override; | 35 void OnViewBeingDestroyed() override; |
34 void OnViewDismissed() override; | 36 void OnViewDismissed() override; |
35 void MoveNearCursor(app_list::AppListView* view) override; | 37 void MoveNearCursor(app_list::AppListView* view) override; |
36 | 38 |
37 AppListServiceLinux(); | 39 AppListServiceLinux(); |
38 | 40 |
39 DISALLOW_COPY_AND_ASSIGN(AppListServiceLinux); | 41 DISALLOW_COPY_AND_ASSIGN(AppListServiceLinux); |
40 }; | 42 }; |
41 | 43 |
42 #endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_SERVICE_LINUX_H_ | 44 #endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_SERVICE_LINUX_H_ |
OLD | NEW |