| 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 #ifndef CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 5 #ifndef CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
| 6 #define CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 6 #define CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 @class AutocompleteTextFieldCell; | 10 @class AutocompleteTextFieldCell; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 // Returns the appropriate "Paste and Go" or "Paste and Search" | 43 // Returns the appropriate "Paste and Go" or "Paste and Search" |
| 44 // context menu string, depending on what is currently in the | 44 // context menu string, depending on what is currently in the |
| 45 // clipboard. Must not be called unless CanPasteAndGo() returns | 45 // clipboard. Must not be called unless CanPasteAndGo() returns |
| 46 // true. | 46 // true. |
| 47 virtual int GetPasteActionStringId() = 0; | 47 virtual int GetPasteActionStringId() = 0; |
| 48 | 48 |
| 49 // Called when the user initiates a "paste and go" or "paste and | 49 // Called when the user initiates a "paste and go" or "paste and |
| 50 // search" into |field_|. | 50 // search" into |field_|. |
| 51 virtual void OnPasteAndGo() = 0; | 51 virtual void OnPasteAndGo() = 0; |
| 52 |
| 53 // Called when the user clicks the hint icon (i.e. the security icon) in the |
| 54 // location bar. |
| 55 virtual void OnSecurityIconClicked() = 0; |
| 52 }; | 56 }; |
| 53 | 57 |
| 54 @interface AutocompleteTextField : NSTextField { | 58 @interface AutocompleteTextField : NSTextField { |
| 55 @private | 59 @private |
| 56 AutocompleteTextFieldObserver* observer_; // weak, owned by location bar. | 60 AutocompleteTextFieldObserver* observer_; // weak, owned by location bar. |
| 57 } | 61 } |
| 58 | 62 |
| 59 @property AutocompleteTextFieldObserver* observer; | 63 @property AutocompleteTextFieldObserver* observer; |
| 60 | 64 |
| 61 // Convenience method to return the cell, casted appropriately. | 65 // Convenience method to return the cell, casted appropriately. |
| 62 - (AutocompleteTextFieldCell*)autocompleteTextFieldCell; | 66 - (AutocompleteTextFieldCell*)autocompleteTextFieldCell; |
| 63 | 67 |
| 64 // If the keyword, keyword hint, or search hint changed, then the | 68 // If the keyword, keyword hint, or search hint changed, then the |
| 65 // field editor may need to be repositioned. | 69 // field editor may need to be repositioned. |
| 66 - (void)resetFieldEditorFrameIfNeeded; | 70 - (void)resetFieldEditorFrameIfNeeded; |
| 67 | 71 |
| 68 @end | 72 @end |
| 69 | 73 |
| 70 #endif // CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 74 #endif // CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
| OLD | NEW |