| 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/views/search_box_view.h" | 5 #include "ui/app_list/views/search_box_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 views::BoxLayout* layout = | 146 views::BoxLayout* layout = |
| 147 new views::BoxLayout(views::BoxLayout::kHorizontal, kPadding, 0, | 147 new views::BoxLayout(views::BoxLayout::kHorizontal, kPadding, 0, |
| 148 kInnerPadding - views::Textfield::kTextPadding); | 148 kInnerPadding - views::Textfield::kTextPadding); |
| 149 content_container_->SetLayoutManager(layout); | 149 content_container_->SetLayoutManager(layout); |
| 150 layout->set_cross_axis_alignment( | 150 layout->set_cross_axis_alignment( |
| 151 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); | 151 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); |
| 152 layout->set_minimum_cross_axis_size(kPreferredHeight); | 152 layout->set_minimum_cross_axis_size(kPreferredHeight); |
| 153 | 153 |
| 154 search_box_->SetBorder(views::Border::NullBorder()); | 154 search_box_->SetBorder(views::Border::NullBorder()); |
| 155 search_box_->SetTextColor(kSearchTextColor); |
| 155 search_box_->set_placeholder_text_color(kHintTextColor); | 156 search_box_->set_placeholder_text_color(kHintTextColor); |
| 156 search_box_->set_controller(this); | 157 search_box_->set_controller(this); |
| 157 content_container_->AddChildView(search_box_); | 158 content_container_->AddChildView(search_box_); |
| 158 layout->SetFlexForView(search_box_, 1); | 159 layout->SetFlexForView(search_box_, 1); |
| 159 | 160 |
| 160 #if !defined(OS_CHROMEOS) | 161 #if !defined(OS_CHROMEOS) |
| 161 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 162 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 162 menu_button_ = new views::MenuButton(NULL, base::string16(), this, false); | 163 menu_button_ = new views::MenuButton(NULL, base::string16(), this, false); |
| 163 menu_button_->SetBorder(views::Border::NullBorder()); | 164 menu_button_->SetBorder(views::Border::NullBorder()); |
| 164 menu_button_->SetImage(views::Button::STATE_NORMAL, | 165 menu_button_->SetImage(views::Button::STATE_NORMAL, |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 NotifyQueryChanged(); | 423 NotifyQueryChanged(); |
| 423 } | 424 } |
| 424 | 425 |
| 425 void SearchBoxView::OnSpeechRecognitionStateChanged( | 426 void SearchBoxView::OnSpeechRecognitionStateChanged( |
| 426 SpeechRecognitionState new_state) { | 427 SpeechRecognitionState new_state) { |
| 427 SpeechRecognitionButtonPropChanged(); | 428 SpeechRecognitionButtonPropChanged(); |
| 428 SchedulePaint(); | 429 SchedulePaint(); |
| 429 } | 430 } |
| 430 | 431 |
| 431 } // namespace app_list | 432 } // namespace app_list |
| OLD | NEW |