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

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

Issue 1682603002: [UI Views] Don't allow a ButtonListener and a MenuButtonListener (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 4 years, 10 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 (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 "base/macros.h" 9 #include "base/macros.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 search_box_->SetBackgroundColor(kSearchBoxBackground); 165 search_box_->SetBackgroundColor(kSearchBoxBackground);
166 search_box_->set_placeholder_text_color(kHintTextColor); 166 search_box_->set_placeholder_text_color(kHintTextColor);
167 search_box_->set_controller(this); 167 search_box_->set_controller(this);
168 search_box_->SetTextInputType(ui::TEXT_INPUT_TYPE_SEARCH); 168 search_box_->SetTextInputType(ui::TEXT_INPUT_TYPE_SEARCH);
169 search_box_->SetTextInputFlags(ui::TEXT_INPUT_FLAG_AUTOCORRECT_OFF); 169 search_box_->SetTextInputFlags(ui::TEXT_INPUT_FLAG_AUTOCORRECT_OFF);
170 content_container_->AddChildView(search_box_); 170 content_container_->AddChildView(search_box_);
171 layout->SetFlexForView(search_box_, 1); 171 layout->SetFlexForView(search_box_, 1);
172 172
173 #if !defined(OS_CHROMEOS) 173 #if !defined(OS_CHROMEOS)
174 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 174 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
175 menu_button_ = new views::MenuButton(NULL, base::string16(), this, false); 175 menu_button_ = new views::MenuButton(base::string16(), this, false);
176 menu_button_->SetBorder(views::Border::NullBorder()); 176 menu_button_->SetBorder(views::Border::NullBorder());
177 menu_button_->SetImage(views::Button::STATE_NORMAL, 177 menu_button_->SetImage(views::Button::STATE_NORMAL,
178 *rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_NORMAL)); 178 *rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_NORMAL));
179 menu_button_->SetImage(views::Button::STATE_HOVERED, 179 menu_button_->SetImage(views::Button::STATE_HOVERED,
180 *rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_HOVER)); 180 *rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_HOVER));
181 menu_button_->SetImage(views::Button::STATE_PRESSED, 181 menu_button_->SetImage(views::Button::STATE_PRESSED,
182 *rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_PRESSED)); 182 *rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_PRESSED));
183 content_container_->AddChildView(menu_button_); 183 content_container_->AddChildView(menu_button_);
184 #endif 184 #endif
185 185
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 NotifyQueryChanged(); 464 NotifyQueryChanged();
465 } 465 }
466 466
467 void SearchBoxView::OnSpeechRecognitionStateChanged( 467 void SearchBoxView::OnSpeechRecognitionStateChanged(
468 SpeechRecognitionState new_state) { 468 SpeechRecognitionState new_state) {
469 SpeechRecognitionButtonPropChanged(); 469 SpeechRecognitionButtonPropChanged();
470 SchedulePaint(); 470 SchedulePaint();
471 } 471 }
472 472
473 } // namespace app_list 473 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/website_settings/permissions_bubble_view.cc ('k') | ui/message_center/views/notifier_settings_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698