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

Side by Side Diff: ui/app_list/search_box_model.cc

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.h ('k') | ui/app_list/search_controller.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 #include "ui/app_list/search_box_model.h" 5 #include "ui/app_list/search_box_model.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "ui/app_list/search_box_model_observer.h" 10 #include "ui/app_list/search_box_model_observer.h"
(...skipping 21 matching lines...) Expand all
32 32
33 SearchBoxModel::~SearchBoxModel() { 33 SearchBoxModel::~SearchBoxModel() {
34 } 34 }
35 35
36 void SearchBoxModel::SetIcon(const gfx::ImageSkia& icon) { 36 void SearchBoxModel::SetIcon(const gfx::ImageSkia& icon) {
37 icon_ = icon; 37 icon_ = icon;
38 FOR_EACH_OBSERVER(SearchBoxModelObserver, observers_, IconChanged()); 38 FOR_EACH_OBSERVER(SearchBoxModelObserver, observers_, IconChanged());
39 } 39 }
40 40
41 void SearchBoxModel::SetSpeechRecognitionButton( 41 void SearchBoxModel::SetSpeechRecognitionButton(
42 scoped_ptr<SearchBoxModel::SpeechButtonProperty> speech_button) { 42 std::unique_ptr<SearchBoxModel::SpeechButtonProperty> speech_button) {
43 speech_button_ = std::move(speech_button); 43 speech_button_ = std::move(speech_button);
44 FOR_EACH_OBSERVER(SearchBoxModelObserver, 44 FOR_EACH_OBSERVER(SearchBoxModelObserver,
45 observers_, 45 observers_,
46 SpeechRecognitionButtonPropChanged()); 46 SpeechRecognitionButtonPropChanged());
47 } 47 }
48 48
49 void SearchBoxModel::SetHintText(const base::string16& hint_text) { 49 void SearchBoxModel::SetHintText(const base::string16& hint_text) {
50 if (hint_text_ == hint_text) 50 if (hint_text_ == hint_text)
51 return; 51 return;
52 52
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 void SearchBoxModel::AddObserver(SearchBoxModelObserver* observer) { 88 void SearchBoxModel::AddObserver(SearchBoxModelObserver* observer) {
89 observers_.AddObserver(observer); 89 observers_.AddObserver(observer);
90 } 90 }
91 91
92 void SearchBoxModel::RemoveObserver(SearchBoxModelObserver* observer) { 92 void SearchBoxModel::RemoveObserver(SearchBoxModelObserver* observer) {
93 observers_.RemoveObserver(observer); 93 observers_.RemoveObserver(observer);
94 } 94 }
95 95
96 } // namespace app_list 96 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/search_box_model.h ('k') | ui/app_list/search_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698