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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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/shower/app_list_shower_impl_unittest.cc » ('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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void AddObserver(SearchResultObserver* observer); 147 void AddObserver(SearchResultObserver* observer);
148 void RemoveObserver(SearchResultObserver* observer); 148 void RemoveObserver(SearchResultObserver* observer);
149 149
150 // Updates the result's relevance score, and sets its title and title tags, 150 // Updates the result's relevance score, and sets its title and title tags,
151 // based on a string match result. 151 // based on a string match result.
152 void UpdateFromMatch(const TokenizedString& title, 152 void UpdateFromMatch(const TokenizedString& title,
153 const TokenizedStringMatch& match); 153 const TokenizedStringMatch& match);
154 154
155 // TODO(mukai): Remove this method and really simplify the ownership of 155 // TODO(mukai): Remove this method and really simplify the ownership of
156 // SearchResult. Ideally, SearchResult will be copyable. 156 // SearchResult. Ideally, SearchResult will be copyable.
157 virtual scoped_ptr<SearchResult> Duplicate() const = 0; 157 virtual std::unique_ptr<SearchResult> Duplicate() const = 0;
158 158
159 // Invokes a custom action on the result. It does nothing by default. 159 // Invokes a custom action on the result. It does nothing by default.
160 virtual void InvokeAction(int action_index, int event_flags); 160 virtual void InvokeAction(int action_index, int event_flags);
161 161
162 // Returns the context menu model for this item, or NULL if there is currently 162 // Returns the context menu model for this item, or NULL if there is currently
163 // no menu for the item (e.g. during install). 163 // no menu for the item (e.g. during install).
164 // Note the returned menu model is owned by this item. 164 // Note the returned menu model is owned by this item.
165 virtual ui::MenuModel* GetContextMenuModel(); 165 virtual ui::MenuModel* GetContextMenuModel();
166 166
167 // Returns a string showing |text| marked up with brackets indicating the 167 // Returns a string showing |text| marked up with brackets indicating the
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 int percent_downloaded_; 202 int percent_downloaded_;
203 203
204 base::ObserverList<SearchResultObserver> observers_; 204 base::ObserverList<SearchResultObserver> observers_;
205 205
206 DISALLOW_COPY_AND_ASSIGN(SearchResult); 206 DISALLOW_COPY_AND_ASSIGN(SearchResult);
207 }; 207 };
208 208
209 } // namespace app_list 209 } // namespace app_list
210 210
211 #endif // UI_APP_LIST_SEARCH_RESULT_H_ 211 #endif // UI_APP_LIST_SEARCH_RESULT_H_
OLDNEW
« no previous file with comments | « ui/app_list/search_provider.cc ('k') | ui/app_list/shower/app_list_shower_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698