| 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 "grit/ui_resources.h" | 9 #include "grit/ui_resources.h" |
| 10 #include "ui/app_list/app_list_model.h" | 10 #include "ui/app_list/app_list_model.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 menu_button_ = new views::MenuButton(NULL, base::string16(), this, false); | 57 menu_button_ = new views::MenuButton(NULL, base::string16(), this, false); |
| 58 menu_button_->set_border(NULL); | 58 menu_button_->set_border(NULL); |
| 59 menu_button_->SetIcon(*rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_NORMAL)); | 59 menu_button_->SetIcon(*rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_NORMAL)); |
| 60 menu_button_->SetHoverIcon(*rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_HOVER)); | 60 menu_button_->SetHoverIcon(*rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_HOVER)); |
| 61 menu_button_->SetPushedIcon(*rb.GetImageSkiaNamed( | 61 menu_button_->SetPushedIcon(*rb.GetImageSkiaNamed( |
| 62 IDR_APP_LIST_TOOLS_PRESSED)); | 62 IDR_APP_LIST_TOOLS_PRESSED)); |
| 63 AddChildView(menu_button_); | 63 AddChildView(menu_button_); |
| 64 #endif | 64 #endif |
| 65 | 65 |
| 66 search_box_->RemoveBorder(); | 66 search_box_->RemoveBorder(); |
| 67 search_box_->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); | 67 search_box_->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont)); |
| 68 search_box_->set_placeholder_text_color(kHintTextColor); | 68 search_box_->set_placeholder_text_color(kHintTextColor); |
| 69 search_box_->SetController(this); | 69 search_box_->SetController(this); |
| 70 AddChildView(search_box_); | 70 AddChildView(search_box_); |
| 71 | 71 |
| 72 ModelChanged(); | 72 ModelChanged(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 SearchBoxView::~SearchBoxView() { | 75 SearchBoxView::~SearchBoxView() { |
| 76 model_->search_box()->RemoveObserver(this); | 76 model_->search_box()->RemoveObserver(this); |
| 77 } | 77 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 void SearchBoxView::SelectionModelChanged() { | 234 void SearchBoxView::SelectionModelChanged() { |
| 235 search_box_->SelectSelectionModel(model_->search_box()->selection_model()); | 235 search_box_->SelectSelectionModel(model_->search_box()->selection_model()); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void SearchBoxView::TextChanged() { | 238 void SearchBoxView::TextChanged() { |
| 239 search_box_->SetText(model_->search_box()->text()); | 239 search_box_->SetText(model_->search_box()->text()); |
| 240 NotifyQueryChanged(); | 240 NotifyQueryChanged(); |
| 241 } | 241 } |
| 242 | 242 |
| 243 } // namespace app_list | 243 } // namespace app_list |
| OLD | NEW |