| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_VIEW_DELEGATE_H_ | 5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_VIEW_DELEGATE_H_ |
| 6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_VIEW_DELEGATE_H_ | 6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_VIEW_DELEGATE_H_ |
| 7 | 7 |
| 8 namespace app_list { | 8 namespace app_list { |
| 9 | 9 |
| 10 class SearchResultView; | 10 class SearchResultView; |
| 11 | 11 |
| 12 class SearchResultViewDelegate { | 12 class SearchResultViewDelegate { |
| 13 public: | 13 public: |
| 14 // Called when the search result is activated. | 14 // Called when the search result is activated. |
| 15 virtual void SearchResultActivated(SearchResultView* view, | 15 virtual void SearchResultActivated(SearchResultView* view, |
| 16 int event_flags) = 0; | 16 int event_flags) = 0; |
| 17 | 17 |
| 18 // Called when one of the search result's optional action icons is activated. | 18 // Called when one of the search result's optional action icons is activated. |
| 19 // |action_index| contains the 0-based index of the action. | 19 // |action_index| contains the 0-based index of the action. |
| 20 virtual void SearchResultActionActivated(SearchResultView* view, | 20 virtual void SearchResultActionActivated(SearchResultView* view, |
| 21 size_t action_index, | 21 size_t action_index, |
| 22 int event_flags) = 0; | 22 int event_flags) = 0; |
| 23 | 23 |
| 24 // Called when the app represented by the search result is installed. |
| 25 virtual void OnSearchResultInstalled(SearchResultView* view) = 0; |
| 26 |
| 24 protected: | 27 protected: |
| 25 virtual ~SearchResultViewDelegate() {} | 28 virtual ~SearchResultViewDelegate() {} |
| 26 }; | 29 }; |
| 27 | 30 |
| 28 } // namespace app_list | 31 } // namespace app_list |
| 29 | 32 |
| 30 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_VIEW_DELEGATE_H_ | 33 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_VIEW_DELEGATE_H_ |
| OLD | NEW |