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 "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
9 #include "ui/app_list/app_list_constants.h" | 9 #include "ui/app_list/app_list_constants.h" |
10 #include "ui/app_list/app_list_model.h" | 10 #include "ui/app_list/app_list_model.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 return true; | 102 return true; |
103 } | 103 } |
104 | 104 |
105 } // namespace | 105 } // namespace |
106 | 106 |
107 // static | 107 // static |
108 | 108 |
109 SpeechView::SpeechView(AppListViewDelegate* delegate) | 109 SpeechView::SpeechView(AppListViewDelegate* delegate) |
110 : delegate_(delegate), | 110 : delegate_(delegate), |
111 logo_(NULL) { | 111 logo_(NULL) { |
112 SetBorder(scoped_ptr<views::Border>(new views::ShadowBorder(gfx::ShadowValue( | 112 SetBorder(scoped_ptr<views::Border>( |
113 gfx::Point(0, kCardShadowYOffset), kCardShadowBlur, kCardShadowColor)))); | 113 new views::ShadowBorder(GetShadowForZHeight(1)))); |
114 | 114 |
115 // To keep the painting order of the border and the background, this class | 115 // To keep the painting order of the border and the background, this class |
116 // actually has a single child of 'container' which has white background and | 116 // actually has a single child of 'container' which has white background and |
117 // contains all components. | 117 // contains all components. |
118 views::View* container = new views::View(); | 118 views::View* container = new views::View(); |
119 container->set_background( | 119 container->set_background( |
120 views::Background::CreateSolidBackground(SK_ColorWHITE)); | 120 views::Background::CreateSolidBackground(SK_ColorWHITE)); |
121 | 121 |
122 const gfx::ImageSkia& logo_image = delegate_->GetSpeechUI()->logo(); | 122 const gfx::ImageSkia& logo_image = delegate_->GetSpeechUI()->logo(); |
123 if (!logo_image.isNull()) { | 123 if (!logo_image.isNull()) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 } | 241 } |
242 speech_result_->SetText(l10n_util::GetStringUTF16(text_resource_id)); | 242 speech_result_->SetText(l10n_util::GetStringUTF16(text_resource_id)); |
243 speech_result_->SetEnabledColor(kHintTextColor); | 243 speech_result_->SetEnabledColor(kHintTextColor); |
244 | 244 |
245 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 245 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
246 mic_button_->SetImage(views::Button::STATE_NORMAL, | 246 mic_button_->SetImage(views::Button::STATE_NORMAL, |
247 bundle.GetImageSkiaNamed(resource_id)); | 247 bundle.GetImageSkiaNamed(resource_id)); |
248 } | 248 } |
249 | 249 |
250 } // namespace app_list | 250 } // namespace app_list |
OLD | NEW |