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_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 // Called when the window |field_| is in loses key to clean up | 106 // Called when the window |field_| is in loses key to clean up |
107 // visual state (such as closing the popup). | 107 // visual state (such as closing the popup). |
108 void OnDidResignKey(); | 108 void OnDidResignKey(); |
109 | 109 |
110 // Called when the user attempts to paste into |field_|. | 110 // Called when the user attempts to paste into |field_|. |
111 void OnPaste(); | 111 void OnPaste(); |
112 | 112 |
113 void AcceptInput(WindowOpenDisposition disposition, bool for_drop); | 113 void AcceptInput(WindowOpenDisposition disposition, bool for_drop); |
114 | 114 |
| 115 // Forwards to |model_| when user hits Tab. |
| 116 void AcceptKeyword(); |
| 117 |
115 // Helper for LocationBarViewMac. Selects all in |field_|. | 118 // Helper for LocationBarViewMac. Selects all in |field_|. |
116 void FocusLocation(); | 119 void FocusLocation(); |
117 | 120 |
118 // Helper to get appropriate contents from |clipboard|. Returns | 121 // Helper to get appropriate contents from |clipboard|. Returns |
119 // empty string if no appropriate data is found on |clipboard|. | 122 // empty string if no appropriate data is found on |clipboard|. |
120 static std::wstring GetClipboardText(Clipboard* clipboard); | 123 static std::wstring GetClipboardText(Clipboard* clipboard); |
121 | 124 |
122 private: | 125 private: |
123 // Returns the field's currently selected range. Only valid if the | 126 // Returns the field's currently selected range. Only valid if the |
124 // field has focus. | 127 // field has focus. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 171 |
169 // Tracking state before and after a possible change for reporting | 172 // Tracking state before and after a possible change for reporting |
170 // to model_. | 173 // to model_. |
171 NSRange selection_before_change_; | 174 NSRange selection_before_change_; |
172 std::wstring text_before_change_; | 175 std::wstring text_before_change_; |
173 | 176 |
174 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); | 177 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); |
175 }; | 178 }; |
176 | 179 |
177 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ | 180 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ |
OLD | NEW |