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

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

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/mixer_unittest.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 (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>
8
7 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
8 #include "ui/app_list/search_box_model_observer.h" 10 #include "ui/app_list/search_box_model_observer.h"
9 11
10 namespace app_list { 12 namespace app_list {
11 13
12 SearchBoxModel::SpeechButtonProperty::SpeechButtonProperty( 14 SearchBoxModel::SpeechButtonProperty::SpeechButtonProperty(
13 const gfx::ImageSkia& on_icon, 15 const gfx::ImageSkia& on_icon,
14 const base::string16& on_tooltip, 16 const base::string16& on_tooltip,
15 const gfx::ImageSkia& off_icon, 17 const gfx::ImageSkia& off_icon,
16 const base::string16& off_tooltip, 18 const base::string16& off_tooltip,
(...skipping 14 matching lines...) Expand all
31 SearchBoxModel::~SearchBoxModel() { 33 SearchBoxModel::~SearchBoxModel() {
32 } 34 }
33 35
34 void SearchBoxModel::SetIcon(const gfx::ImageSkia& icon) { 36 void SearchBoxModel::SetIcon(const gfx::ImageSkia& icon) {
35 icon_ = icon; 37 icon_ = icon;
36 FOR_EACH_OBSERVER(SearchBoxModelObserver, observers_, IconChanged()); 38 FOR_EACH_OBSERVER(SearchBoxModelObserver, observers_, IconChanged());
37 } 39 }
38 40
39 void SearchBoxModel::SetSpeechRecognitionButton( 41 void SearchBoxModel::SetSpeechRecognitionButton(
40 scoped_ptr<SearchBoxModel::SpeechButtonProperty> speech_button) { 42 scoped_ptr<SearchBoxModel::SpeechButtonProperty> speech_button) {
41 speech_button_ = speech_button.Pass(); 43 speech_button_ = std::move(speech_button);
42 FOR_EACH_OBSERVER(SearchBoxModelObserver, 44 FOR_EACH_OBSERVER(SearchBoxModelObserver,
43 observers_, 45 observers_,
44 SpeechRecognitionButtonPropChanged()); 46 SpeechRecognitionButtonPropChanged());
45 } 47 }
46 48
47 void SearchBoxModel::SetHintText(const base::string16& hint_text) { 49 void SearchBoxModel::SetHintText(const base::string16& hint_text) {
48 if (hint_text_ == hint_text) 50 if (hint_text_ == hint_text)
49 return; 51 return;
50 52
51 hint_text_ = hint_text; 53 hint_text_ = hint_text;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 87
86 void SearchBoxModel::AddObserver(SearchBoxModelObserver* observer) { 88 void SearchBoxModel::AddObserver(SearchBoxModelObserver* observer) {
87 observers_.AddObserver(observer); 89 observers_.AddObserver(observer);
88 } 90 }
89 91
90 void SearchBoxModel::RemoveObserver(SearchBoxModelObserver* observer) { 92 void SearchBoxModel::RemoveObserver(SearchBoxModelObserver* observer) {
91 observers_.RemoveObserver(observer); 93 observers_.RemoveObserver(observer);
92 } 94 }
93 95
94 } // namespace app_list 96 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/search/mixer_unittest.cc ('k') | ui/app_list/search_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698