| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // Called when the field's frame changes. | 67 // Called when the field's frame changes. |
| 68 virtual void OnFrameChanged() = 0; | 68 virtual void OnFrameChanged() = 0; |
| 69 | 69 |
| 70 // Called when the popup is no longer appropriate, such as when the | 70 // Called when the popup is no longer appropriate, such as when the |
| 71 // field's window loses focus or a page action is clicked. | 71 // field's window loses focus or a page action is clicked. |
| 72 virtual void ClosePopup() = 0; | 72 virtual void ClosePopup() = 0; |
| 73 | 73 |
| 74 // Called when the user begins editing the field, for every edit, | 74 // Called when the user begins editing the field, for every edit, |
| 75 // and when the user is done editing the field. | 75 // and when the user is done editing the field. |
| 76 virtual void OnDidBeginEditing() = 0; | 76 virtual void OnDidBeginEditing() = 0; |
| 77 virtual void OnBeforeChange() = 0; |
| 77 virtual void OnDidChange() = 0; | 78 virtual void OnDidChange() = 0; |
| 78 virtual void OnDidEndEditing() = 0; | 79 virtual void OnDidEndEditing() = 0; |
| 79 | 80 |
| 80 // Called before input methods sets composition text in the field. | 81 // Called before input methods sets composition text in the field. |
| 81 virtual void OnStartingIME() = 0; | 82 virtual void OnStartingIME() = 0; |
| 82 | 83 |
| 83 // NSResponder translates certain keyboard actions into selectors | 84 // NSResponder translates certain keyboard actions into selectors |
| 84 // passed to -doCommandBySelector:. The selector is forwarded here, | 85 // passed to -doCommandBySelector:. The selector is forwarded here, |
| 85 // return true if |cmd| is handled, false if the caller should | 86 // return true if |cmd| is handled, false if the caller should |
| 86 // handle it. | 87 // handle it. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // Return the appropriate menu for any decoration under |event|. | 139 // Return the appropriate menu for any decoration under |event|. |
| 139 - (NSMenu*)decorationMenuForEvent:(NSEvent*)event; | 140 - (NSMenu*)decorationMenuForEvent:(NSEvent*)event; |
| 140 | 141 |
| 141 // Retains |tooltip| (in |currentToolTips_|) and adds this tooltip | 142 // Retains |tooltip| (in |currentToolTips_|) and adds this tooltip |
| 142 // via -[NSView addToolTipRect:owner:userData:]. | 143 // via -[NSView addToolTipRect:owner:userData:]. |
| 143 - (void)addToolTip:(NSString*)tooltip forRect:(NSRect)aRect; | 144 - (void)addToolTip:(NSString*)tooltip forRect:(NSRect)aRect; |
| 144 | 145 |
| 145 @end | 146 @end |
| 146 | 147 |
| 147 #endif // CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 148 #endif // CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
| OLD | NEW |