| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_TILE_ITEM_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_TILE_ITEM_VIEW_H_ |
| 6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_TILE_ITEM_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_TILE_ITEM_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/app_list/search_result_observer.h" | 9 #include "ui/app_list/search_result_observer.h" |
| 10 #include "ui/app_list/views/tile_item_view.h" | 10 #include "ui/app_list/views/tile_item_view.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 SearchResult* result() { return item_; } | 33 SearchResult* result() { return item_; } |
| 34 void SetSearchResult(SearchResult* item); | 34 void SetSearchResult(SearchResult* item); |
| 35 | 35 |
| 36 // Overridden from TileItemView: | 36 // Overridden from TileItemView: |
| 37 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 37 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 38 bool OnKeyPressed(const ui::KeyEvent& event) override; | 38 bool OnKeyPressed(const ui::KeyEvent& event) override; |
| 39 | 39 |
| 40 // Overridden from SearchResultObserver: | 40 // Overridden from SearchResultObserver: |
| 41 void OnIconChanged() override; | 41 void OnIconChanged() override; |
| 42 void OnBadgeIconChanged() override; | 42 void OnBadgeIconChanged() override; |
| 43 void OnPriceChanged() override; |
| 44 void OnRatingChanged() override; |
| 43 void OnResultDestroying() override; | 45 void OnResultDestroying() override; |
| 44 | 46 |
| 45 // views::ContextMenuController overrides: | 47 // views::ContextMenuController overrides: |
| 46 void ShowContextMenuForView(views::View* source, | 48 void ShowContextMenuForView(views::View* source, |
| 47 const gfx::Point& point, | 49 const gfx::Point& point, |
| 48 ui::MenuSourceType source_type) override; | 50 ui::MenuSourceType source_type) override; |
| 49 | 51 |
| 50 private: | 52 private: |
| 51 SearchResultContainerView* result_container_; // Parent view | 53 SearchResultContainerView* result_container_; // Parent view |
| 52 | 54 |
| 53 // Owned by the model provided by the AppListViewDelegate. | 55 // Owned by the model provided by the AppListViewDelegate. |
| 54 SearchResult* item_; | 56 SearchResult* item_; |
| 55 | 57 |
| 56 AppListViewDelegate* view_delegate_; | 58 AppListViewDelegate* view_delegate_; |
| 57 | 59 |
| 58 std::unique_ptr<views::MenuRunner> context_menu_runner_; | 60 std::unique_ptr<views::MenuRunner> context_menu_runner_; |
| 59 | 61 |
| 60 DISALLOW_COPY_AND_ASSIGN(SearchResultTileItemView); | 62 DISALLOW_COPY_AND_ASSIGN(SearchResultTileItemView); |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 } // namespace app_list | 65 } // namespace app_list |
| 64 | 66 |
| 65 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_TILE_ITEM_VIEW_H_ | 67 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_TILE_ITEM_VIEW_H_ |
| OLD | NEW |