Chromium Code Reviews| Index: chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h |
| diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..053e15f2be5c464d138196870bb940c141e594a1 |
| --- /dev/null |
| +++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_RESULT_H_ |
| +#define CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_RESULT_H_ |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/profiles/profile.h" |
| +#include "extensions/browser/extension_icon_image.h" |
| +#include "extensions/common/extension.h" |
| +#include "ui/app_list/search_result.h" |
| + |
| +namespace app_list { |
| + |
| +class LauncherSearchResult : public SearchResult, |
| + public extensions::IconImage::Observer { |
| + public: |
| + LauncherSearchResult(const std::string& id, |
| + scoped_ptr<std::string> icon_url, |
| + const int discrete_value_relevance, |
| + Profile* profile, |
| + const extensions::Extension* extension); |
| + ~LauncherSearchResult() override; |
| + scoped_ptr<SearchResult> Duplicate() const override; |
| + |
| + void OnExtensionIconImageChanged(extensions::IconImage* image) override; |
| + |
| + private: |
| + void UpdateIcon(); |
| + |
| + scoped_ptr<std::string> icon_url_; |
|
Matt Giuca
2015/04/10 13:29:14
Can this just be a std::string? (Or better, a GURL
yawano
2015/04/13 07:30:52
Done.
|
| + const int discrete_value_relevance_; |
|
Matt Giuca
2015/04/10 13:29:14
// Must be between 0 and kMaxSearchResultScore.
yawano
2015/04/13 07:30:52
Done.
|
| + Profile* profile_; |
| + const extensions::Extension* extension_; |
| + scoped_ptr<extensions::IconImage> extension_icon_image_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(LauncherSearchResult); |
| +}; |
| + |
| +} // namespace app_list |
| + |
| +#endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_RESULT_H_ |