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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 virtual void OnTemporaryTextMaybeChanged(const std::wstring& display_text, | 79 virtual void OnTemporaryTextMaybeChanged(const std::wstring& display_text, |
80 bool save_original_selection); | 80 bool save_original_selection); |
81 virtual bool OnInlineAutocompleteTextMaybeChanged( | 81 virtual bool OnInlineAutocompleteTextMaybeChanged( |
82 const std::wstring& display_text, size_t user_text_length); | 82 const std::wstring& display_text, size_t user_text_length); |
83 virtual void OnRevertTemporaryText(); | 83 virtual void OnRevertTemporaryText(); |
84 virtual void OnBeforePossibleChange(); | 84 virtual void OnBeforePossibleChange(); |
85 virtual bool OnAfterPossibleChange(); | 85 virtual bool OnAfterPossibleChange(); |
86 | 86 |
87 // Helper functions for use from AutocompleteEditHelper Objective-C | 87 // Helper functions for use from AutocompleteEditHelper Objective-C |
88 // class. | 88 // class. |
| 89 |
| 90 // Trivial wrappers forwarding to |model_| methods. |
| 91 void OnControlKeyChanged(bool pressed); |
| 92 void OnEscapeKeyPressed(); |
89 void OnUpOrDownKeyPressed(bool up, bool by_page); | 93 void OnUpOrDownKeyPressed(bool up, bool by_page); |
90 void OnEscapeKeyPressed(); | |
91 | 94 |
92 // Called when editing begins in the field, and before the results | 95 // Called when editing begins in the field, and before the results |
93 // of any editing are communicated to |model_|. | 96 // of any editing are communicated to |model_|. |
94 void OnWillBeginEditing(); | 97 void OnWillBeginEditing(); |
95 | 98 |
96 // Called when editing ends in the field. | 99 // Called when editing ends in the field. |
97 void OnDidEndEditing(); | 100 void OnDidEndEditing(); |
98 | 101 |
99 // Called when the window |field_| is in loses key to clean up | 102 // Called when the window |field_| is in loses key to clean up |
100 // visual state (such as closing the popup). | 103 // visual state (such as closing the popup). |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 164 |
162 // Tracking state before and after a possible change for reporting | 165 // Tracking state before and after a possible change for reporting |
163 // to model_. | 166 // to model_. |
164 NSRange selection_before_change_; | 167 NSRange selection_before_change_; |
165 std::wstring text_before_change_; | 168 std::wstring text_before_change_; |
166 | 169 |
167 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); | 170 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); |
168 }; | 171 }; |
169 | 172 |
170 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ | 173 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ |
OLD | NEW |