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

Side by Side Diff: chrome/browser/ui/views/edit_search_engine_dialog.cc

Issue 6034002: Replace Textfield::Keystroke with views::KeyEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: key_code, ET_KEY_PRESS for WM_CHAR Created 9 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/views/edit_search_engine_dialog.h" 5 #include "chrome/browser/views/edit_search_engine_dialog.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 views::View* EditSearchEngineDialog::GetContentsView() { 107 views::View* EditSearchEngineDialog::GetContentsView() {
108 return this; 108 return this;
109 } 109 }
110 110
111 void EditSearchEngineDialog::ContentsChanged(Textfield* sender, 111 void EditSearchEngineDialog::ContentsChanged(Textfield* sender,
112 const std::wstring& new_contents) { 112 const std::wstring& new_contents) {
113 GetDialogClientView()->UpdateDialogButtons(); 113 GetDialogClientView()->UpdateDialogButtons();
114 UpdateImageViews(); 114 UpdateImageViews();
115 } 115 }
116 116
117 bool EditSearchEngineDialog::HandleKeystroke( 117 bool EditSearchEngineDialog::HandleKeyEvent(
118 Textfield* sender, 118 Textfield* sender,
119 const views::Textfield::Keystroke& key) { 119 const views::KeyEvent& key_event) {
120 return false; 120 return false;
121 } 121 }
122 122
123 void EditSearchEngineDialog::Init() { 123 void EditSearchEngineDialog::Init() {
124 // Create the views we'll need. 124 // Create the views we'll need.
125 if (controller_->template_url()) { 125 if (controller_->template_url()) {
126 title_tf_ = 126 title_tf_ =
127 CreateTextfield(controller_->template_url()->short_name(), false); 127 CreateTextfield(controller_->template_url()->short_name(), false);
128 keyword_tf_ = CreateTextfield(controller_->template_url()->keyword(), true); 128 keyword_tf_ = CreateTextfield(controller_->template_url()->keyword(), true);
129 url_tf_ = 129 url_tf_ =
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 image_view->SetImage( 257 image_view->SetImage(
258 ResourceBundle::GetSharedInstance().GetBitmapNamed( 258 ResourceBundle::GetSharedInstance().GetBitmapNamed(
259 IDR_INPUT_GOOD)); 259 IDR_INPUT_GOOD));
260 } else { 260 } else {
261 image_view->SetTooltipText(l10n_util::GetString(invalid_message_id)); 261 image_view->SetTooltipText(l10n_util::GetString(invalid_message_id));
262 image_view->SetImage( 262 image_view->SetImage(
263 ResourceBundle::GetSharedInstance().GetBitmapNamed( 263 ResourceBundle::GetSharedInstance().GetBitmapNamed(
264 IDR_INPUT_ALERT)); 264 IDR_INPUT_ALERT));
265 } 265 }
266 } 266 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/edit_search_engine_dialog.h ('k') | chrome/browser/ui/views/find_bar_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698