Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h

Issue 1071093002: Implement setSearchResults. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clear results after query is ended. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698