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