| OLD | NEW |
| 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 // 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 Loading... |
| 51 MessageBoxFlags::DialogButton button) const; | 51 MessageBoxFlags::DialogButton button) const; |
| 52 virtual bool Cancel(); | 52 virtual bool Cancel(); |
| 53 virtual bool Accept(); | 53 virtual bool Accept(); |
| 54 virtual views::View* GetContentsView(); | 54 virtual views::View* GetContentsView(); |
| 55 | 55 |
| 56 // views::Textfield::Controller overrides. Updates whether the user can | 56 // views::Textfield::Controller overrides. Updates whether the user can |
| 57 // accept the dialog as well as updating image views showing whether value is | 57 // accept the dialog as well as updating image views showing whether value is |
| 58 // valid. | 58 // valid. |
| 59 virtual void ContentsChanged(views::Textfield* sender, | 59 virtual void ContentsChanged(views::Textfield* sender, |
| 60 const std::wstring& new_contents); | 60 const std::wstring& new_contents); |
| 61 virtual bool HandleKeystroke(views::Textfield* sender, | 61 virtual bool HandleKeyEvent(views::Textfield* sender, |
| 62 const views::Textfield::Keystroke& key); | 62 const views::KeyEvent& key_event); |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 void Init(); | 65 void Init(); |
| 66 | 66 |
| 67 // Create a Label containing the text with the specified message id. | 67 // Create a Label containing the text with the specified message id. |
| 68 views::Label* CreateLabel(int message_id); | 68 views::Label* CreateLabel(int message_id); |
| 69 | 69 |
| 70 // Creates a text field with the specified text. If |lowercase| is true, the | 70 // Creates a text field with the specified text. If |lowercase| is true, the |
| 71 // Textfield is configured to map all input to lower case. | 71 // Textfield is configured to map all input to lower case. |
| 72 views::Textfield* CreateTextfield(const std::wstring& text, bool lowercase); | 72 views::Textfield* CreateTextfield(const std::wstring& text, bool lowercase); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 96 views::ImageView* title_iv_; | 96 views::ImageView* title_iv_; |
| 97 views::ImageView* keyword_iv_; | 97 views::ImageView* keyword_iv_; |
| 98 views::ImageView* url_iv_; | 98 views::ImageView* url_iv_; |
| 99 | 99 |
| 100 scoped_ptr<EditSearchEngineController> controller_; | 100 scoped_ptr<EditSearchEngineController> controller_; |
| 101 | 101 |
| 102 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineDialog); | 102 DISALLOW_COPY_AND_ASSIGN(EditSearchEngineDialog); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 #endif // CHROME_BROWSER_UI_VIEWS_EDIT_SEARCH_ENGINE_DIALOG_H_ | 105 #endif // CHROME_BROWSER_UI_VIEWS_EDIT_SEARCH_ENGINE_DIALOG_H_ |
| OLD | NEW |