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_APP_LIST_SEARCH_ARC_APP_RESULT_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_ARC_APP_RESULT_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_ARC_APP_RESULT_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_ARC_APP_RESULT_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "chrome/browser/ui/app_icon_loader_delegate.h" | 12 #include "chrome/browser/ui/app_icon_loader_delegate.h" |
13 #include "chrome/browser/ui/app_list/search/app_result.h" | 13 #include "chrome/browser/ui/app_list/search/app_result.h" |
14 | 14 |
15 class AppListControllerDelegate; | 15 class AppListControllerDelegate; |
16 class ArcAppContextMenu; | 16 class ArcAppContextMenu; |
17 class ArcAppIconLoader; | 17 class ArcAppIconLoader; |
18 class Profile; | 18 class Profile; |
19 | 19 |
20 namespace app_list { | 20 namespace app_list { |
21 | 21 |
22 class ArcAppResult : public AppResult, | 22 class ArcAppResult : public AppResult, |
23 public AppIconLoaderDelegate { | 23 public AppIconLoaderDelegate { |
24 public: | 24 public: |
25 ArcAppResult(Profile* profile, | 25 ArcAppResult(Profile* profile, |
26 const std::string& app_id, | 26 const std::string& app_id, |
27 AppListControllerDelegate* controller, | 27 AppListControllerDelegate* controller, |
28 bool is_recommendation); | 28 bool is_recommendation); |
29 ~ArcAppResult() override; | 29 ~ArcAppResult() override; |
30 | 30 |
31 // SearchResult overrides: | 31 // SearchResult overrides: |
32 void Open(int event_flags) override; | 32 void Open(int event_flags) override; |
33 scoped_ptr<SearchResult> Duplicate() const override; | 33 std::unique_ptr<SearchResult> Duplicate() const override; |
34 ui::MenuModel* GetContextMenuModel() override; | 34 ui::MenuModel* GetContextMenuModel() override; |
35 | 35 |
36 // AppContextMenuDelegate overrides: | 36 // AppContextMenuDelegate overrides: |
37 void ExecuteLaunchCommand(int event_flags) override; | 37 void ExecuteLaunchCommand(int event_flags) override; |
38 | 38 |
39 // AppIconLoaderDelegate overrides: | 39 // AppIconLoaderDelegate overrides: |
40 void OnAppImageUpdated(const std::string& app_id, | 40 void OnAppImageUpdated(const std::string& app_id, |
41 const gfx::ImageSkia& image) override; | 41 const gfx::ImageSkia& image) override; |
42 | 42 |
43 private: | 43 private: |
44 scoped_ptr<ArcAppIconLoader> icon_loader_; | 44 std::unique_ptr<ArcAppIconLoader> icon_loader_; |
45 scoped_ptr<ArcAppContextMenu> context_menu_; | 45 std::unique_ptr<ArcAppContextMenu> context_menu_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(ArcAppResult); | 47 DISALLOW_COPY_AND_ASSIGN(ArcAppResult); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace app_list | 50 } // namespace app_list |
51 | 51 |
52 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_ARC_APP_RESULT_H_ | 52 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_ARC_APP_RESULT_H_ |
OLD | NEW |