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_WIN_APP_LIST_SERVICE_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_SERVICE_WIN_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_SERVICE_WIN_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_SERVICE_WIN_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/ui/app_list/app_list_service_views.h" | 10 #include "chrome/browser/ui/app_list/app_list_service_views.h" |
11 | 11 |
12 class ActivationTrackerWin; | 12 class ActivationTrackerWin; |
13 | 13 |
14 template <typename T> struct DefaultSingletonTraits; | 14 template <typename T> struct DefaultSingletonTraits; |
15 | 15 |
16 class AppListServiceWin : public AppListServiceViews { | 16 class AppListServiceWin : public AppListServiceViews { |
17 public: | 17 public: |
18 virtual ~AppListServiceWin(); | 18 ~AppListServiceWin() override; |
19 | 19 |
20 static AppListServiceWin* GetInstance(); | 20 static AppListServiceWin* GetInstance(); |
21 | 21 |
22 // AppListService overrides: | 22 // AppListService overrides: |
23 virtual void SetAppListNextPaintCallback(void (*callback)()) override; | 23 void SetAppListNextPaintCallback(void (*callback)()) override; |
24 virtual void Init(Profile* initial_profile) override; | 24 void Init(Profile* initial_profile) override; |
25 virtual void ShowForProfile(Profile* requested_profile) override; | 25 void ShowForProfile(Profile* requested_profile) override; |
26 virtual void CreateShortcut() override; | 26 void CreateShortcut() override; |
27 | 27 |
28 private: | 28 private: |
29 friend struct DefaultSingletonTraits<AppListServiceWin>; | 29 friend struct DefaultSingletonTraits<AppListServiceWin>; |
30 | 30 |
31 // AppListServiceViews overrides: | 31 // AppListServiceViews overrides: |
32 virtual void OnViewBeingDestroyed(); | 32 void OnViewBeingDestroyed() override; |
33 | 33 |
34 // AppListShowerDelegate overrides: | 34 // AppListShowerDelegate overrides: |
35 virtual void OnViewCreated() override; | 35 void OnViewCreated() override; |
36 virtual void OnViewDismissed() override; | 36 void OnViewDismissed() override; |
37 virtual void MoveNearCursor(app_list::AppListView* view) override; | 37 void MoveNearCursor(app_list::AppListView* view) override; |
38 | 38 |
39 AppListServiceWin(); | 39 AppListServiceWin(); |
40 | 40 |
41 bool IsWarmupNeeded(); | 41 bool IsWarmupNeeded(); |
42 void ScheduleWarmup(); | 42 void ScheduleWarmup(); |
43 | 43 |
44 // Loads the profile last used with the app list and populates the view from | 44 // Loads the profile last used with the app list and populates the view from |
45 // it without showing it so that the next show is faster. Does nothing if the | 45 // it without showing it so that the next show is faster. Does nothing if the |
46 // view already exists, or another profile is in the middle of being loaded to | 46 // view already exists, or another profile is in the middle of being loaded to |
47 // be shown. | 47 // be shown. |
48 void LoadProfileForWarmup(); | 48 void LoadProfileForWarmup(); |
49 void OnLoadProfileForWarmup(Profile* initial_profile); | 49 void OnLoadProfileForWarmup(Profile* initial_profile); |
50 | 50 |
51 scoped_ptr<ActivationTrackerWin> activation_tracker_; | 51 scoped_ptr<ActivationTrackerWin> activation_tracker_; |
52 | 52 |
53 base::Closure next_paint_callback_; | 53 base::Closure next_paint_callback_; |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(AppListServiceWin); | 55 DISALLOW_COPY_AND_ASSIGN(AppListServiceWin); |
56 }; | 56 }; |
57 | 57 |
58 #endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_SERVICE_WIN_H_ | 58 #endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_SERVICE_WIN_H_ |
OLD | NEW |