| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |