OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_TILE_ITEM_VIEW_H_ |
| 6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_TILE_ITEM_VIEW_H_ |
| 7 |
| 8 #include "ui/app_list/search_result_observer.h" |
| 9 #include "ui/app_list/views/tile_item_view.h" |
| 10 |
| 11 namespace app_list { |
| 12 |
| 13 class SearchResult; |
| 14 |
| 15 // A TileItemView that displays a search result. |
| 16 class APP_LIST_EXPORT SearchResultTileItemView : public TileItemView, |
| 17 public SearchResultObserver { |
| 18 public: |
| 19 SearchResultTileItemView(); |
| 20 ~SearchResultTileItemView() override; |
| 21 |
| 22 void SetSearchResult(SearchResult* item); |
| 23 |
| 24 // Overridden from TileItemView: |
| 25 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 26 |
| 27 // Overridden from SearchResultObserver: |
| 28 void OnIconChanged() override; |
| 29 void OnResultDestroying() override; |
| 30 |
| 31 private: |
| 32 // Owned by the model provided by the AppListViewDelegate. |
| 33 SearchResult* item_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(SearchResultTileItemView); |
| 36 }; |
| 37 |
| 38 } // namespace app_list |
| 39 |
| 40 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_TILE_ITEM_VIEW_H_ |
OLD | NEW |