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

Side by Side Diff: ui/app_list/search_provider.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_controller.cc ('k') | ui/app_list/search_provider.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 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_SEARCH_PROVIDER_H_ 5 #ifndef UI_APP_LIST_SEARCH_PROVIDER_H_
6 #define UI_APP_LIST_SEARCH_PROVIDER_H_ 6 #define UI_APP_LIST_SEARCH_PROVIDER_H_
7 7
8 #include <memory>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
12 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
13 #include "ui/app_list/app_list_export.h" 14 #include "ui/app_list/app_list_export.h"
14 15
15 namespace app_list { 16 namespace app_list {
16 17
17 class SearchResult; 18 class SearchResult;
18 19
19 class APP_LIST_EXPORT SearchProvider { 20 class APP_LIST_EXPORT SearchProvider {
20 public: 21 public:
(...skipping 10 matching lines...) Expand all
31 virtual void Stop() = 0; 32 virtual void Stop() = 0;
32 33
33 void set_result_changed_callback(const ResultChangedCallback& callback) { 34 void set_result_changed_callback(const ResultChangedCallback& callback) {
34 result_changed_callback_ = callback; 35 result_changed_callback_ = callback;
35 } 36 }
36 37
37 const Results& results() const { return results_; } 38 const Results& results() const { return results_; }
38 39
39 protected: 40 protected:
40 // Interface for the derived class to generate search results. 41 // Interface for the derived class to generate search results.
41 void Add(scoped_ptr<SearchResult> result); 42 void Add(std::unique_ptr<SearchResult> result);
42 void ClearResults(); 43 void ClearResults();
43 44
44 private: 45 private:
45 void FireResultChanged(); 46 void FireResultChanged();
46 47
47 ResultChangedCallback result_changed_callback_; 48 ResultChangedCallback result_changed_callback_;
48 Results results_; 49 Results results_;
49 50
50 DISALLOW_COPY_AND_ASSIGN(SearchProvider); 51 DISALLOW_COPY_AND_ASSIGN(SearchProvider);
51 }; 52 };
52 53
53 } // namespace app_list 54 } // namespace app_list
54 55
55 #endif // UI_APP_LIST_SEARCH_PROVIDER_H_ 56 #endif // UI_APP_LIST_SEARCH_PROVIDER_H_
OLDNEW
« no previous file with comments | « ui/app_list/search_controller.cc ('k') | ui/app_list/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698