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 virtual ~AppListServiceWin(); |
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 virtual void SetAppListNextPaintCallback(void (*callback)()) override; |
24 virtual void HandleFirstRun() OVERRIDE; | 24 virtual void HandleFirstRun() override; |
25 virtual void Init(Profile* initial_profile) OVERRIDE; | 25 virtual void Init(Profile* initial_profile) override; |
26 virtual void ShowForProfile(Profile* requested_profile) OVERRIDE; | 26 virtual void ShowForProfile(Profile* requested_profile) override; |
27 virtual void CreateShortcut() OVERRIDE; | 27 virtual void CreateShortcut() override; |
28 | 28 |
29 private: | 29 private: |
30 friend struct DefaultSingletonTraits<AppListServiceWin>; | 30 friend struct DefaultSingletonTraits<AppListServiceWin>; |
31 | 31 |
32 // AppListServiceViews overrides: | 32 // AppListServiceViews overrides: |
33 virtual void OnViewBeingDestroyed(); | 33 virtual void OnViewBeingDestroyed(); |
34 | 34 |
35 // AppListShowerDelegate overrides: | 35 // AppListShowerDelegate overrides: |
36 virtual void OnViewCreated() OVERRIDE; | 36 virtual void OnViewCreated() override; |
37 virtual void OnViewDismissed() OVERRIDE; | 37 virtual void OnViewDismissed() override; |
38 virtual void MoveNearCursor(app_list::AppListView* view) OVERRIDE; | 38 virtual void MoveNearCursor(app_list::AppListView* view) override; |
39 | 39 |
40 AppListServiceWin(); | 40 AppListServiceWin(); |
41 | 41 |
42 bool IsWarmupNeeded(); | 42 bool IsWarmupNeeded(); |
43 void ScheduleWarmup(); | 43 void ScheduleWarmup(); |
44 | 44 |
45 // Loads the profile last used with the app list and populates the view from | 45 // Loads the profile last used with the app list and populates the view from |
46 // it without showing it so that the next show is faster. Does nothing if the | 46 // it without showing it so that the next show is faster. Does nothing if the |
47 // view already exists, or another profile is in the middle of being loaded to | 47 // view already exists, or another profile is in the middle of being loaded to |
48 // be shown. | 48 // be shown. |
49 void LoadProfileForWarmup(); | 49 void LoadProfileForWarmup(); |
50 void OnLoadProfileForWarmup(Profile* initial_profile); | 50 void OnLoadProfileForWarmup(Profile* initial_profile); |
51 | 51 |
52 bool enable_app_list_on_next_init_; | 52 bool enable_app_list_on_next_init_; |
53 scoped_ptr<ActivationTrackerWin> activation_tracker_; | 53 scoped_ptr<ActivationTrackerWin> activation_tracker_; |
54 | 54 |
55 base::Closure next_paint_callback_; | 55 base::Closure next_paint_callback_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(AppListServiceWin); | 57 DISALLOW_COPY_AND_ASSIGN(AppListServiceWin); |
58 }; | 58 }; |
59 | 59 |
60 #endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_SERVICE_WIN_H_ | 60 #endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_SERVICE_WIN_H_ |
OLD | NEW |