Index: chrome/browser/ui/app_list/search/suggestions/suggestions_result.h |
diff --git a/chrome/browser/ui/app_list/search/suggestions/suggestions_result.h b/chrome/browser/ui/app_list/search/suggestions/suggestions_result.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d9ae89c902ca5b0711d2f5b87e6ec58d2d28bea4 |
--- /dev/null |
+++ b/chrome/browser/ui/app_list/search/suggestions/suggestions_result.h |
@@ -0,0 +1,51 @@ |
+// Copyright 2014 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_SUGGESTIONS_SUGGESTIONS_RESULT_H_ |
+#define CHROME_BROWSER_UI_APP_LIST_SEARCH_SUGGESTIONS_SUGGESTIONS_RESULT_H_ |
+ |
+#include "base/memory/scoped_ptr.h" |
huangs
2014/12/03 20:36:11
Forward-declare AppListControllerDelegate instead?
Mathieu
2014/12/03 21:01:30
Done.
|
+#include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
huangs
2014/12/03 20:36:11
Forward-declare AppListControllerDelegate instead?
Mathieu
2014/12/03 21:01:30
Done.
|
+#include "components/suggestions/proto/suggestions.pb.h" |
+#include "components/suggestions/suggestions_service.h" |
huangs
2014/12/03 20:36:11
Forward-declare suggestions::SuggestionsService in
Mathieu
2014/12/03 21:01:30
Done.
|
+#include "ui/app_list/search_result.h" |
+ |
+class GURL; |
+class Profile; |
+class SkBitmap; |
+ |
+namespace app_list { |
+ |
+class SuggestionsResult : public SearchResult { |
+ public: |
+ SuggestionsResult(Profile* profile, |
+ AppListControllerDelegate* list_controller, |
+ suggestions::SuggestionsService* suggestions_service, |
+ const suggestions::ChromeSuggestion suggestion, |
huangs
2014/12/03 20:36:11
Missing "&" for const ?
Mathieu
2014/12/03 21:01:30
Done.
|
+ int index); |
+ ~SuggestionsResult() override; |
+ |
+ // SearchResult overrides: |
+ void Open(int event_flags) override; |
+ scoped_ptr<SearchResult> Duplicate() override; |
+ |
+ private: |
+ void UpdateIcon(); |
+ void OnSuggestionsThumbnailAvailable(const GURL& url, const SkBitmap* bitmap); |
+ |
+ Profile* profile_; |
+ AppListControllerDelegate* list_controller_; |
+ suggestions::SuggestionsService* suggestions_service_; |
+ suggestions::ChromeSuggestion suggestion_; |
+ int index_; |
+ |
+ // For callbacks may be run after destruction. |
+ base::WeakPtrFactory<SuggestionsResult> weak_ptr_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SuggestionsResult); |
+}; |
+ |
+} // namespace app_list |
+ |
+#endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_SUGGESTIONS_SUGGESTIONS_RESULT_H_ |