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

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

Issue 135863002: Reland Merge NativeTextfieldViews into views::Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle Ctrl-Shift-Delete and Backspace on Linux, like on ChromeOS. Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/views/folder_header_view.cc ('k') | ui/base/touch/touch_editing_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #if !defined(OS_CHROMEOS) 56 #if !defined(OS_CHROMEOS)
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_->set_border(NULL);
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
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
OLDNEW
« no previous file with comments | « ui/app_list/views/folder_header_view.cc ('k') | ui/base/touch/touch_editing_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698