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_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_RESULT
_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_RESULT
_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_RESULT
_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_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/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon
_image_loader.h" | 13 #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon
_image_loader.h" |
14 #include "extensions/common/extension.h" | 14 #include "extensions/common/extension.h" |
15 #include "ui/app_list/search_result.h" | 15 #include "ui/app_list/search_result.h" |
16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 namespace app_list { | 18 namespace app_list { |
19 | 19 |
20 class LauncherSearchResult : public SearchResult, | 20 class LauncherSearchResult : public SearchResult, |
21 public LauncherSearchIconImageLoader::Observer { | 21 public LauncherSearchIconImageLoader::Observer { |
22 public: | 22 public: |
23 LauncherSearchResult( | 23 LauncherSearchResult( |
24 const std::string& item_id, | 24 const std::string& item_id, |
25 const GURL& icon_url, | 25 const GURL& icon_url, |
26 const int discrete_value_relevance, | 26 const int discrete_value_relevance, |
27 Profile* profile, | 27 Profile* profile, |
28 const extensions::Extension* extension, | 28 const extensions::Extension* extension, |
29 scoped_ptr<chromeos::launcher_search_provider::ErrorReporter> | 29 std::unique_ptr<chromeos::launcher_search_provider::ErrorReporter> |
30 error_reporter); | 30 error_reporter); |
31 ~LauncherSearchResult() override; | 31 ~LauncherSearchResult() override; |
32 scoped_ptr<SearchResult> Duplicate() const override; | 32 std::unique_ptr<SearchResult> Duplicate() const override; |
33 void Open(int event_flags) override; | 33 void Open(int event_flags) override; |
34 | 34 |
35 void OnIconImageChanged(LauncherSearchIconImageLoader* image_loader) override; | 35 void OnIconImageChanged(LauncherSearchIconImageLoader* image_loader) override; |
36 void OnBadgeIconImageChanged( | 36 void OnBadgeIconImageChanged( |
37 LauncherSearchIconImageLoader* image_loader) override; | 37 LauncherSearchIconImageLoader* image_loader) override; |
38 | 38 |
39 private: | 39 private: |
40 // Constructor for duplicating a result. | 40 // Constructor for duplicating a result. |
41 LauncherSearchResult( | 41 LauncherSearchResult( |
42 const std::string& item_id, | 42 const std::string& item_id, |
(...skipping 14 matching lines...) Expand all Loading... |
57 Profile* profile_; | 57 Profile* profile_; |
58 const extensions::Extension* extension_; | 58 const extensions::Extension* extension_; |
59 linked_ptr<LauncherSearchIconImageLoader> icon_image_loader_; | 59 linked_ptr<LauncherSearchIconImageLoader> icon_image_loader_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(LauncherSearchResult); | 61 DISALLOW_COPY_AND_ASSIGN(LauncherSearchResult); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace app_list | 64 } // namespace app_list |
65 | 65 |
66 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_RES
ULT_H_ | 66 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_RES
ULT_H_ |
OLD | NEW |