OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_APP_LIST_ARC_ARC_APP_MODEL_BUILDER_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_MODEL_BUILDER_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_MODEL_BUILDER_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_MODEL_BUILDER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 | 12 |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | |
14 #include "chrome/browser/ui/app_list/app_list_model_builder.h" | 14 #include "chrome/browser/ui/app_list/app_list_model_builder.h" |
15 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 15 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
16 | 16 |
17 class AppListControllerDelegate; | 17 class AppListControllerDelegate; |
18 class ArcAppItem; | 18 class ArcAppItem; |
19 | 19 |
20 // This class populates and maintains ARC apps. | 20 // This class populates and maintains ARC apps. |
21 class ArcAppModelBuilder : public AppListModelBuilder, | 21 class ArcAppModelBuilder : public AppListModelBuilder, |
22 public ArcAppListPrefs::Observer { | 22 public ArcAppListPrefs::Observer { |
23 public: | 23 public: |
(...skipping 12 matching lines...) Expand all Loading... |
36 void OnAppIconUpdated(const std::string& app_id, | 36 void OnAppIconUpdated(const std::string& app_id, |
37 ui::ScaleFactor scale_factor) override; | 37 ui::ScaleFactor scale_factor) override; |
38 void OnAppNameUpdated(const std::string& app_id, | 38 void OnAppNameUpdated(const std::string& app_id, |
39 const std::string& name) override; | 39 const std::string& name) override; |
40 | 40 |
41 // AppListItemListObserver. | 41 // AppListItemListObserver. |
42 void OnListItemMoved(size_t from_index, | 42 void OnListItemMoved(size_t from_index, |
43 size_t to_index, | 43 size_t to_index, |
44 app_list::AppListItem* item) override; | 44 app_list::AppListItem* item) override; |
45 | 45 |
46 scoped_ptr<ArcAppItem> CreateApp(const std::string& app_id, | 46 std::unique_ptr<ArcAppItem> CreateApp(const std::string& app_id, |
47 const ArcAppListPrefs::AppInfo& info); | 47 const ArcAppListPrefs::AppInfo& info); |
48 | 48 |
49 ArcAppItem* GetArcAppItem(const std::string& app_id); | 49 ArcAppItem* GetArcAppItem(const std::string& app_id); |
50 | 50 |
51 ArcAppListPrefs* prefs_ = nullptr; | 51 ArcAppListPrefs* prefs_ = nullptr; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(ArcAppModelBuilder); | 53 DISALLOW_COPY_AND_ASSIGN(ArcAppModelBuilder); |
54 }; | 54 }; |
55 | 55 |
56 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_MODEL_BUILDER_H_ | 56 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_MODEL_BUILDER_H_ |
OLD | NEW |