OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // and removes entry from the list of tracking items. | 56 // and removes entry from the list of tracking items. |
57 void Close(const std::string& app_id); | 57 void Close(const std::string& app_id); |
58 | 58 |
59 private: | 59 private: |
60 // Defines mapping of a shelf app id to a corresponded controller. Shelf app | 60 // Defines mapping of a shelf app id to a corresponded controller. Shelf app |
61 // id is optional mapping (for example, Play Store to ARC Host Support). | 61 // id is optional mapping (for example, Play Store to ARC Host Support). |
62 using AppControllerMap = | 62 using AppControllerMap = |
63 std::map<std::string, ArcAppDeferredLauncherItemController*>; | 63 std::map<std::string, ArcAppDeferredLauncherItemController*>; |
64 | 64 |
65 void UpdateApps(); | 65 void UpdateApps(); |
| 66 void UpdateApp(const std::string& app_id); |
66 void RegisterNextUpdate(); | 67 void RegisterNextUpdate(); |
67 | 68 |
68 // Unowned pointers. | 69 // Unowned pointers. |
69 ChromeLauncherControllerImpl* owner_; | 70 ChromeLauncherControllerImpl* owner_; |
70 Profile* observed_profile_ = nullptr; | 71 Profile* observed_profile_ = nullptr; |
71 | 72 |
72 AppControllerMap app_controller_map_; | 73 AppControllerMap app_controller_map_; |
73 | 74 |
74 // Always keep this the last member of this class. | 75 // Always keep this the last member of this class. |
75 base::WeakPtrFactory<ArcAppDeferredLauncherController> weak_ptr_factory_; | 76 base::WeakPtrFactory<ArcAppDeferredLauncherController> weak_ptr_factory_; |
76 | 77 |
77 DISALLOW_COPY_AND_ASSIGN(ArcAppDeferredLauncherController); | 78 DISALLOW_COPY_AND_ASSIGN(ArcAppDeferredLauncherController); |
78 }; | 79 }; |
79 | 80 |
80 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H
_ | 81 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H
_ |
OLD | NEW |