OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SEARCH_RESULT_H_ | 5 #ifndef UI_APP_LIST_SEARCH_RESULT_H_ |
6 #define UI_APP_LIST_SEARCH_RESULT_H_ | 6 #define UI_APP_LIST_SEARCH_RESULT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // Returns the dimension at which this result's icon should be displayed. | 120 // Returns the dimension at which this result's icon should be displayed. |
121 int GetPreferredIconDimension() const; | 121 int GetPreferredIconDimension() const; |
122 | 122 |
123 void NotifyItemInstalled(); | 123 void NotifyItemInstalled(); |
124 | 124 |
125 void AddObserver(SearchResultObserver* observer); | 125 void AddObserver(SearchResultObserver* observer); |
126 void RemoveObserver(SearchResultObserver* observer); | 126 void RemoveObserver(SearchResultObserver* observer); |
127 | 127 |
128 // TODO(mukai): Remove this method and really simplify the ownership of | 128 // TODO(mukai): Remove this method and really simplify the ownership of |
129 // SearchResult. Ideally, SearchResult will be copyable. | 129 // SearchResult. Ideally, SearchResult will be copyable. |
130 virtual scoped_ptr<SearchResult> Duplicate() = 0; | 130 virtual scoped_ptr<SearchResult> Duplicate() const = 0; |
131 | 131 |
132 // Opens the result. | 132 // Opens the result. |
133 virtual void Open(int event_flags); | 133 virtual void Open(int event_flags); |
134 | 134 |
135 // Invokes a custom action on the result. It does nothing by default. | 135 // Invokes a custom action on the result. It does nothing by default. |
136 virtual void InvokeAction(int action_index, int event_flags); | 136 virtual void InvokeAction(int action_index, int event_flags); |
137 | 137 |
138 // Returns the context menu model for this item, or NULL if there is currently | 138 // Returns the context menu model for this item, or NULL if there is currently |
139 // no menu for the item (e.g. during install). | 139 // no menu for the item (e.g. during install). |
140 // Note the returned menu model is owned by this item. | 140 // Note the returned menu model is owned by this item. |
(...skipping 27 matching lines...) Expand all Loading... |
168 int percent_downloaded_; | 168 int percent_downloaded_; |
169 | 169 |
170 ObserverList<SearchResultObserver> observers_; | 170 ObserverList<SearchResultObserver> observers_; |
171 | 171 |
172 DISALLOW_COPY_AND_ASSIGN(SearchResult); | 172 DISALLOW_COPY_AND_ASSIGN(SearchResult); |
173 }; | 173 }; |
174 | 174 |
175 } // namespace app_list | 175 } // namespace app_list |
176 | 176 |
177 #endif // UI_APP_LIST_SEARCH_RESULT_H_ | 177 #endif // UI_APP_LIST_SEARCH_RESULT_H_ |
OLD | NEW |