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

Side by Side Diff: ui/app_list/views/speech_view.cc

Issue 2734113006: "Bootstrap" a toolkit-views Typography spec. (Closed)
Patch Set: Rebase (conflict in layout_delegate.h due to r457774) Created 3 years, 9 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698