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..e40cb0e1998df5b64bc6272803495e624647650b |
| --- /dev/null |
| +++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h |
| @@ -0,0 +1,45 @@ |
| +// 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_ |
| + |
|
Matt Giuca
2015/04/14 03:15:44
#include <string>
yawano
2015/04/14 05:42:00
Done.
|
| +#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" |
|
Matt Giuca
2015/04/14 03:15:44
#include "url/gurl.h"
yawano
2015/04/14 05:42:00
Done.
|
| + |
| +namespace app_list { |
| + |
| +class LauncherSearchResult : public SearchResult, |
| + public extensions::IconImage::Observer { |
| + public: |
| + LauncherSearchResult(const std::string& item_id, |
| + const GURL& 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(); |
| + |
| + const std::string item_id_; |
| + const GURL icon_url_; |
| + // Must be between 0 and kMaxSearchResultScore. |
| + const int discrete_value_relevance_; |
| + 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_ |