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 32 matching lines...) Loading... |
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 | 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; | |
56 | |
57 // Called when the field's frame changes. | 53 // Called when the field's frame changes. |
58 virtual void OnFrameChanged() = 0; | 54 virtual void OnFrameChanged() = 0; |
59 }; | 55 }; |
60 | 56 |
61 @interface AutocompleteTextField : NSTextField { | 57 @interface AutocompleteTextField : NSTextField { |
62 @private | 58 @private |
63 AutocompleteTextFieldObserver* observer_; // weak, owned by location bar. | 59 AutocompleteTextFieldObserver* observer_; // weak, owned by location bar. |
64 } | 60 } |
65 | 61 |
66 @property AutocompleteTextFieldObserver* observer; | 62 @property AutocompleteTextFieldObserver* observer; |
(...skipping 11 matching lines...) Loading... |
78 - (CGFloat)availableDecorationWidth; | 74 - (CGFloat)availableDecorationWidth; |
79 | 75 |
80 // Superclass aborts editing before changing the string, which causes | 76 // Superclass aborts editing before changing the string, which causes |
81 // problems for undo. This version modifies the field editor's | 77 // problems for undo. This version modifies the field editor's |
82 // contents if the control is already being edited. | 78 // contents if the control is already being edited. |
83 - (void)setAttributedStringValue:(NSAttributedString*)aString; | 79 - (void)setAttributedStringValue:(NSAttributedString*)aString; |
84 | 80 |
85 @end | 81 @end |
86 | 82 |
87 #endif // CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 83 #endif // CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
OLD | NEW |