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

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

Issue 10693160: Add and specify Views::Textfield::SelectAll |reversed| flag, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove redundant comments. Created 8 years, 5 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) 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 "chrome/browser/ui/views/edit_search_engine_dialog.h" 5 #include "chrome/browser/ui/views/edit_search_engine_dialog.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/search_engines/template_url.h" 10 #include "chrome/browser/search_engines/template_url.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 TemplateURL* template_url, 55 TemplateURL* template_url,
56 EditSearchEngineControllerDelegate* delegate, 56 EditSearchEngineControllerDelegate* delegate,
57 Profile* profile) { 57 Profile* profile) {
58 EditSearchEngineDialog* contents = 58 EditSearchEngineDialog* contents =
59 new EditSearchEngineDialog(template_url, delegate, profile); 59 new EditSearchEngineDialog(template_url, delegate, profile);
60 // Window interprets an empty rectangle as needing to query the content for 60 // Window interprets an empty rectangle as needing to query the content for
61 // the size as well as centering relative to the parent. 61 // the size as well as centering relative to the parent.
62 views::Widget::CreateWindowWithParent(contents, parent); 62 views::Widget::CreateWindowWithParent(contents, parent);
63 contents->GetWidget()->Show(); 63 contents->GetWidget()->Show();
64 contents->GetDialogClientView()->UpdateDialogButtons(); 64 contents->GetDialogClientView()->UpdateDialogButtons();
65 contents->title_tf_->SelectAll(); 65 contents->title_tf_->SelectAll(true);
66 contents->title_tf_->RequestFocus(); 66 contents->title_tf_->RequestFocus();
67 } 67 }
68 68
69 ui::ModalType EditSearchEngineDialog::GetModalType() const { 69 ui::ModalType EditSearchEngineDialog::GetModalType() const {
70 return ui::MODAL_TYPE_WINDOW; 70 return ui::MODAL_TYPE_WINDOW;
71 } 71 }
72 72
73 string16 EditSearchEngineDialog::GetWindowTitle() const { 73 string16 EditSearchEngineDialog::GetWindowTitle() const {
74 return l10n_util::GetStringUTF16(controller_->template_url() ? 74 return l10n_util::GetStringUTF16(controller_->template_url() ?
75 IDS_SEARCH_ENGINES_EDITOR_EDIT_WINDOW_TITLE : 75 IDS_SEARCH_ENGINES_EDITOR_EDIT_WINDOW_TITLE :
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 int invalid_message_id) { 248 int invalid_message_id) {
249 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 249 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
250 if (is_valid) { 250 if (is_valid) {
251 image_view->SetTooltipText(string16()); 251 image_view->SetTooltipText(string16());
252 image_view->SetImage(rb.GetImageSkiaNamed(IDR_INPUT_GOOD)); 252 image_view->SetImage(rb.GetImageSkiaNamed(IDR_INPUT_GOOD));
253 } else { 253 } else {
254 image_view->SetTooltipText(l10n_util::GetStringUTF16(invalid_message_id)); 254 image_view->SetTooltipText(l10n_util::GetStringUTF16(invalid_message_id));
255 image_view->SetImage(rb.GetImageSkiaNamed(IDR_INPUT_ALERT)); 255 image_view->SetImage(rb.GetImageSkiaNamed(IDR_INPUT_ALERT));
256 } 256 }
257 } 257 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc ('k') | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698