Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: ui/app_list/search_result.h

Issue 621823004: Simplifies the structure of app_list search a bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/app_list/search_provider.cc ('k') | ui/app_list/test/test_search_result.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // Returns the dimension at which this result's icon should be displayed. 112 // Returns the dimension at which this result's icon should be displayed.
113 int GetPreferredIconDimension() const; 113 int GetPreferredIconDimension() const;
114 114
115 void NotifyItemInstalled(); 115 void NotifyItemInstalled();
116 void NotifyItemUninstalled(); 116 void NotifyItemUninstalled();
117 117
118 void AddObserver(SearchResultObserver* observer); 118 void AddObserver(SearchResultObserver* observer);
119 void RemoveObserver(SearchResultObserver* observer); 119 void RemoveObserver(SearchResultObserver* observer);
120 120
121 // TODO(mukai): Remove this method and really simplify the ownership of
122 // SearchResult. Ideally, SearchResult will be copyable.
123 virtual scoped_ptr<SearchResult> Duplicate() = 0;
124
121 // Opens the result. 125 // Opens the result.
122 virtual void Open(int event_flags); 126 virtual void Open(int event_flags);
123 127
124 // Invokes a custom action on the result. 128 // Invokes a custom action on the result. It does nothing by default.
125 virtual void InvokeAction(int action_index, int event_flags); 129 virtual void InvokeAction(int action_index, int event_flags);
126 130
127 // Returns the context menu model for this item, or NULL if there is currently 131 // Returns the context menu model for this item, or NULL if there is currently
128 // no menu for the item (e.g. during install). 132 // no menu for the item (e.g. during install).
129 // Note the returned menu model is owned by this item. 133 // Note the returned menu model is owned by this item.
130 virtual ui::MenuModel* GetContextMenuModel(); 134 virtual ui::MenuModel* GetContextMenuModel();
131 135
132 protected: 136 protected:
133 void set_id(const std::string& id) { id_ = id; } 137 void set_id(const std::string& id) { id_ = id; }
134 void set_relevance(double relevance) { relevance_ = relevance; } 138 void set_relevance(double relevance) { relevance_ = relevance; }
(...skipping 20 matching lines...) Expand all
155 int percent_downloaded_; 159 int percent_downloaded_;
156 160
157 ObserverList<SearchResultObserver> observers_; 161 ObserverList<SearchResultObserver> observers_;
158 162
159 DISALLOW_COPY_AND_ASSIGN(SearchResult); 163 DISALLOW_COPY_AND_ASSIGN(SearchResult);
160 }; 164 };
161 165
162 } // namespace app_list 166 } // namespace app_list
163 167
164 #endif // UI_APP_LIST_SEARCH_RESULT_H_ 168 #endif // UI_APP_LIST_SEARCH_RESULT_H_
OLDNEW
« no previous file with comments | « ui/app_list/search_provider.cc ('k') | ui/app_list/test/test_search_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698