| OLD | NEW |
| 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 #include "ui/app_list/views/speech_view.h" | 5 #include "ui/app_list/views/speech_view.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 MicButton* mic_button = new MicButton(this); | 138 MicButton* mic_button = new MicButton(this); |
| 139 mic_button_ = mic_button; | 139 mic_button_ = mic_button; |
| 140 container->AddChildView(mic_button_); | 140 container->AddChildView(mic_button_); |
| 141 mic_button_->SetEventTargeter(std::unique_ptr<views::ViewTargeter>( | 141 mic_button_->SetEventTargeter(std::unique_ptr<views::ViewTargeter>( |
| 142 new views::ViewTargeter(mic_button))); | 142 new views::ViewTargeter(mic_button))); |
| 143 | 143 |
| 144 // TODO(mukai): use BoundedLabel to cap 2 lines. | 144 // TODO(mukai): use BoundedLabel to cap 2 lines. |
| 145 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 145 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 146 speech_result_ = new views::Label( | 146 speech_result_ = new views::Label( |
| 147 base::string16(), bundle.GetFontList(ui::ResourceBundle::LargeFont)); | 147 base::string16(), {bundle.GetFontList(ui::ResourceBundle::LargeFont)}); |
| 148 speech_result_->SetMultiLine(true); | 148 speech_result_->SetMultiLine(true); |
| 149 speech_result_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 149 speech_result_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 150 | 150 |
| 151 container->AddChildView(speech_result_); | 151 container->AddChildView(speech_result_); |
| 152 | 152 |
| 153 AddChildView(container); | 153 AddChildView(container); |
| 154 | 154 |
| 155 delegate_->GetSpeechUI()->AddObserver(this); | 155 delegate_->GetSpeechUI()->AddObserver(this); |
| 156 indicator_animator_.reset(new views::BoundsAnimator(container)); | 156 indicator_animator_.reset(new views::BoundsAnimator(container)); |
| 157 indicator_animator_->SetAnimationDuration(kIndicatorAnimationDuration); | 157 indicator_animator_->SetAnimationDuration(kIndicatorAnimationDuration); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 } | 246 } |
| 247 speech_result_->SetText(l10n_util::GetStringUTF16(text_resource_id)); | 247 speech_result_->SetText(l10n_util::GetStringUTF16(text_resource_id)); |
| 248 speech_result_->SetEnabledColor(kHintTextColor); | 248 speech_result_->SetEnabledColor(kHintTextColor); |
| 249 | 249 |
| 250 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 250 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 251 mic_button_->SetImage(views::Button::STATE_NORMAL, | 251 mic_button_->SetImage(views::Button::STATE_NORMAL, |
| 252 bundle.GetImageSkiaNamed(resource_id)); | 252 bundle.GetImageSkiaNamed(resource_id)); |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace app_list | 255 } // namespace app_list |
| OLD | NEW |