| OLD | NEW |
| 1 // Copyright (c) 2006-2008 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 // EditKeywordController provides text fields for editing a keyword: the title, | 5 // EditKeywordController 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_VIEWS_EDIT_KEYWORD_CONTROLLER_H_ | 10 #ifndef CHROME_BROWSER_VIEWS_EDIT_KEYWORD_CONTROLLER_H_ |
| 11 #define CHROME_BROWSER_VIEWS_EDIT_KEYWORD_CONTROLLER_H_ | 11 #define CHROME_BROWSER_VIEWS_EDIT_KEYWORD_CONTROLLER_H_ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 virtual void DeleteDelegate(); | 49 virtual void DeleteDelegate(); |
| 50 virtual bool Cancel(); | 50 virtual bool Cancel(); |
| 51 virtual bool Accept(); | 51 virtual bool Accept(); |
| 52 virtual views::View* GetContentsView(); | 52 virtual views::View* GetContentsView(); |
| 53 | 53 |
| 54 // views::TextField::Controller overrides. Updates whether the user can | 54 // views::TextField::Controller overrides. Updates whether the user can |
| 55 // accept the dialog as well as updating image views showing whether value is | 55 // accept the dialog as well as updating image views showing whether value is |
| 56 // valid. | 56 // valid. |
| 57 virtual void ContentsChanged(views::TextField* sender, | 57 virtual void ContentsChanged(views::TextField* sender, |
| 58 const std::wstring& new_contents); | 58 const std::wstring& new_contents); |
| 59 virtual void HandleKeystroke(views::TextField* sender, | 59 virtual bool HandleKeystroke(views::TextField* sender, |
| 60 UINT message, | 60 UINT message, |
| 61 TCHAR key, | 61 TCHAR key, |
| 62 UINT repeat_count, | 62 UINT repeat_count, |
| 63 UINT flags); | 63 UINT flags); |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 void Init(); | 66 void Init(); |
| 67 | 67 |
| 68 // Create a Label containing the text with the specified message id. | 68 // Create a Label containing the text with the specified message id. |
| 69 views::Label* CreateLabel(int message_id); | 69 views::Label* CreateLabel(int message_id); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 // Shows error images. | 127 // Shows error images. |
| 128 views::ImageView* title_iv_; | 128 views::ImageView* title_iv_; |
| 129 views::ImageView* keyword_iv_; | 129 views::ImageView* keyword_iv_; |
| 130 views::ImageView* url_iv_; | 130 views::ImageView* url_iv_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(EditKeywordController); | 132 DISALLOW_COPY_AND_ASSIGN(EditKeywordController); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 #endif // CHROME_BROWSER_VIEWS_EDIT_KEYWORD_CONTROLLER_H_ | 135 #endif // CHROME_BROWSER_VIEWS_EDIT_KEYWORD_CONTROLLER_H_ |
| OLD | NEW |