| 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(), views::Label::CustomFont{ |
| 148 bundle.GetFontList(ui::ResourceBundle::LargeFont)}); |
| 148 speech_result_->SetMultiLine(true); | 149 speech_result_->SetMultiLine(true); |
| 149 speech_result_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 150 speech_result_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 150 | 151 |
| 151 container->AddChildView(speech_result_); | 152 container->AddChildView(speech_result_); |
| 152 | 153 |
| 153 AddChildView(container); | 154 AddChildView(container); |
| 154 | 155 |
| 155 delegate_->GetSpeechUI()->AddObserver(this); | 156 delegate_->GetSpeechUI()->AddObserver(this); |
| 156 indicator_animator_.reset(new views::BoundsAnimator(container)); | 157 indicator_animator_.reset(new views::BoundsAnimator(container)); |
| 157 indicator_animator_->SetAnimationDuration(kIndicatorAnimationDuration); | 158 indicator_animator_->SetAnimationDuration(kIndicatorAnimationDuration); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 } | 247 } |
| 247 speech_result_->SetText(l10n_util::GetStringUTF16(text_resource_id)); | 248 speech_result_->SetText(l10n_util::GetStringUTF16(text_resource_id)); |
| 248 speech_result_->SetEnabledColor(kHintTextColor); | 249 speech_result_->SetEnabledColor(kHintTextColor); |
| 249 | 250 |
| 250 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 251 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 251 mic_button_->SetImage(views::Button::STATE_NORMAL, | 252 mic_button_->SetImage(views::Button::STATE_NORMAL, |
| 252 bundle.GetImageSkiaNamed(resource_id)); | 253 bundle.GetImageSkiaNamed(resource_id)); |
| 253 } | 254 } |
| 254 | 255 |
| 255 } // namespace app_list | 256 } // namespace app_list |
| OLD | NEW |