OLD | NEW |
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 virtual bool Cancel() OVERRIDE; | 45 virtual bool Cancel() OVERRIDE; |
46 virtual bool Accept() OVERRIDE; | 46 virtual bool Accept() OVERRIDE; |
47 virtual views::View* GetContentsView() OVERRIDE; | 47 virtual views::View* GetContentsView() OVERRIDE; |
48 | 48 |
49 // views::TextfieldController: | 49 // views::TextfieldController: |
50 // Updates whether the user can accept the dialog as well as updating image | 50 // Updates whether the user can accept the dialog as well as updating image |
51 // views showing whether value is valid. | 51 // views showing whether value is valid. |
52 virtual void ContentsChanged(views::Textfield* sender, | 52 virtual void ContentsChanged(views::Textfield* sender, |
53 const string16& new_contents) OVERRIDE; | 53 const string16& new_contents) OVERRIDE; |
54 virtual bool HandleKeyEvent(views::Textfield* sender, | 54 virtual bool HandleKeyEvent(views::Textfield* sender, |
55 const views::KeyEvent& key_event) OVERRIDE; | 55 const ui::KeyEvent& key_event) OVERRIDE; |
56 private: | 56 private: |
57 void Init(); | 57 void Init(); |
58 | 58 |
59 // Create a Label containing the text with the specified message id. | 59 // Create a Label containing the text with the specified message id. |
60 views::Label* CreateLabel(int message_id); | 60 views::Label* CreateLabel(int message_id); |
61 | 61 |
62 // Creates a text field with the specified text. If |lowercase| is true, the | 62 // Creates a text field with the specified text. If |lowercase| is true, the |
63 // Textfield is configured to map all input to lower case. | 63 // Textfield is configured to map all input to lower case. |
64 views::Textfield* CreateTextfield(const string16& text, bool lowercase); | 64 views::Textfield* CreateTextfield(const string16& text, bool lowercase); |
65 | 65 |
(...skipping 19 matching lines...) Expand all Loading... |
85 views::ImageView* title_iv_; | 85 views::ImageView* title_iv_; |
86 views::ImageView* keyword_iv_; | 86 views::ImageView* keyword_iv_; |
87 views::ImageView* url_iv_; | 87 views::ImageView* url_iv_; |
88 | 88 |
89 scoped_ptr<EditSearchEngineController> controller_; | 89 scoped_ptr<EditSearchEngineController> controller_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineDialog); | 91 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineDialog); |
92 }; | 92 }; |
93 | 93 |
94 #endif // CHROME_BROWSER_UI_VIEWS_EDIT_SEARCH_ENGINE_DIALOG_H_ | 94 #endif // CHROME_BROWSER_UI_VIEWS_EDIT_SEARCH_ENGINE_DIALOG_H_ |
OLD | NEW |