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

Side by Side Diff: ui/app_list/search_controller.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_box_model.cc ('k') | ui/app_list/search_controller.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 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_SEARCH_CONTROLLER_H_ 5 #ifndef UI_APP_LIST_SEARCH_CONTROLLER_H_
6 #define UI_APP_LIST_SEARCH_CONTROLLER_H_ 6 #define UI_APP_LIST_SEARCH_CONTROLLER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
13 #include "base/timer/timer.h" 14 #include "base/timer/timer.h"
14 #include "ui/app_list/app_list_export.h" 15 #include "ui/app_list/app_list_export.h"
15 #include "ui/app_list/app_list_model.h" 16 #include "ui/app_list/app_list_model.h"
16 #include "ui/app_list/search/mixer.h" 17 #include "ui/app_list/search/mixer.h"
17 #include "ui/app_list/speech_ui_model_observer.h" 18 #include "ui/app_list/speech_ui_model_observer.h"
18 19
19 namespace app_list { 20 namespace app_list {
20 21
21 class History; 22 class History;
(...skipping 19 matching lines...) Expand all
41 int action_index, 42 int action_index,
42 int event_flags); 43 int event_flags);
43 44
44 // Adds a new mixer group. See Mixer::AddGroup. 45 // Adds a new mixer group. See Mixer::AddGroup.
45 size_t AddGroup(size_t max_results, double boost, double multiplier); 46 size_t AddGroup(size_t max_results, double boost, double multiplier);
46 47
47 // Adds a new mixer group. See Mixer::AddOmniboxGroup. 48 // Adds a new mixer group. See Mixer::AddOmniboxGroup.
48 size_t AddOmniboxGroup(size_t max_results, double boost, double multiplier); 49 size_t AddOmniboxGroup(size_t max_results, double boost, double multiplier);
49 50
50 // Takes ownership of |provider| and associates it with given mixer group. 51 // Takes ownership of |provider| and associates it with given mixer group.
51 void AddProvider(size_t group_id, scoped_ptr<SearchProvider> provider); 52 void AddProvider(size_t group_id, std::unique_ptr<SearchProvider> provider);
52 53
53 private: 54 private:
54 typedef ScopedVector<SearchProvider> Providers; 55 typedef ScopedVector<SearchProvider> Providers;
55 56
56 // Invoked when the search results are changed. 57 // Invoked when the search results are changed.
57 void OnResultsChanged(); 58 void OnResultsChanged();
58 59
59 SearchBoxModel* search_box_; 60 SearchBoxModel* search_box_;
60 61
61 bool dispatching_query_; 62 bool dispatching_query_;
62 Providers providers_; 63 Providers providers_;
63 scoped_ptr<Mixer> mixer_; 64 std::unique_ptr<Mixer> mixer_;
64 History* history_; // KeyedService, not owned. 65 History* history_; // KeyedService, not owned.
65 66
66 bool is_voice_query_; 67 bool is_voice_query_;
67 68
68 base::OneShotTimer stop_timer_; 69 base::OneShotTimer stop_timer_;
69 70
70 DISALLOW_COPY_AND_ASSIGN(SearchController); 71 DISALLOW_COPY_AND_ASSIGN(SearchController);
71 }; 72 };
72 73
73 } // namespace app_list 74 } // namespace app_list
74 75
75 #endif // UI_APP_LIST_SEARCH_CONTROLLER_H_ 76 #endif // UI_APP_LIST_SEARCH_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/app_list/search_box_model.cc ('k') | ui/app_list/search_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698