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

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

Issue 138363004: Views Textfield fixes and cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and rebase. 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
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 // EditSearchEngineDialog provides text fields for editing a keyword: the title, 5 // EditSearchEngineDialog provides text fields for editing a keyword: the title,
6 // url and actual keyword. It is used by the KeywordEditorView of the Options 6 // url and actual keyword. It is used by the KeywordEditorView of the Options
7 // dialog, and also on its own to confirm the addition of a keyword added by 7 // dialog, and also on its own to confirm the addition of a keyword added by
8 // the ExternalJSObject via the RenderView. 8 // the ExternalJSObject via the RenderView.
9 9
10 #ifndef CHROME_BROWSER_UI_VIEWS_EDIT_SEARCH_ENGINE_DIALOG_H_ 10 #ifndef CHROME_BROWSER_UI_VIEWS_EDIT_SEARCH_ENGINE_DIALOG_H_
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 virtual void ContentsChanged(views::Textfield* sender, 51 virtual void ContentsChanged(views::Textfield* sender,
52 const base::string16& new_contents) OVERRIDE; 52 const base::string16& new_contents) OVERRIDE;
53 virtual bool HandleKeyEvent(views::Textfield* sender, 53 virtual bool HandleKeyEvent(views::Textfield* sender,
54 const ui::KeyEvent& key_event) OVERRIDE; 54 const ui::KeyEvent& key_event) OVERRIDE;
55 private: 55 private:
56 void Init(); 56 void Init();
57 57
58 // Create a Label containing the text with the specified message id. 58 // Create a Label containing the text with the specified message id.
59 views::Label* CreateLabel(int message_id); 59 views::Label* CreateLabel(int message_id);
60 60
61 // Creates a text field with the specified text. If |lowercase| is true, the 61 // Creates a text field with the specified text.
62 // Textfield is configured to map all input to lower case. 62 views::Textfield* CreateTextfield(const base::string16& text);
63 views::Textfield* CreateTextfield(const base::string16& text, bool lowercase);
64 63
65 // Invokes UpdateImageView for each of the images views. 64 // Invokes UpdateImageView for each of the images views.
66 void UpdateImageViews(); 65 void UpdateImageViews();
67 66
68 // Updates the tooltip and image of the image view based on is_valid. If 67 // Updates the tooltip and image of the image view based on is_valid. If
69 // is_valid is false the tooltip of the image view is set to the message with 68 // is_valid is false the tooltip of the image view is set to the message with
70 // id invalid_message_id, otherwise the tooltip is set to the empty text. 69 // id invalid_message_id, otherwise the tooltip is set to the empty text.
71 void UpdateImageView(views::ImageView* image_view, 70 void UpdateImageView(views::ImageView* image_view,
72 bool is_valid, 71 bool is_valid,
73 int invalid_message_id); 72 int invalid_message_id);
(...skipping 10 matching lines...) Expand all
84 views::ImageView* title_iv_; 83 views::ImageView* title_iv_;
85 views::ImageView* keyword_iv_; 84 views::ImageView* keyword_iv_;
86 views::ImageView* url_iv_; 85 views::ImageView* url_iv_;
87 86
88 scoped_ptr<EditSearchEngineController> controller_; 87 scoped_ptr<EditSearchEngineController> controller_;
89 88
90 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineDialog); 89 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineDialog);
91 }; 90 };
92 91
93 #endif // CHROME_BROWSER_UI_VIEWS_EDIT_SEARCH_ENGINE_DIALOG_H_ 92 #endif // CHROME_BROWSER_UI_VIEWS_EDIT_SEARCH_ENGINE_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/crypto_module_password_dialog_view.cc ('k') | chrome/browser/ui/views/edit_search_engine_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698