| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 89 |
| 90 // Returns true if |popup_view_| is open. |
| 91 bool IsPopupOpen() const; |
| 92 |
| 90 // Trivial wrappers forwarding to |model_| methods. | 93 // Trivial wrappers forwarding to |model_| methods. |
| 91 void OnControlKeyChanged(bool pressed); | 94 void OnControlKeyChanged(bool pressed); |
| 92 void OnEscapeKeyPressed(); | 95 void OnEscapeKeyPressed(); |
| 93 void OnUpOrDownKeyPressed(bool up, bool by_page); | 96 void OnUpOrDownKeyPressed(bool up, bool by_page); |
| 94 | 97 |
| 95 // Called when editing begins in the field, and before the results | 98 // Called when editing begins in the field, and before the results |
| 96 // of any editing are communicated to |model_|. | 99 // of any editing are communicated to |model_|. |
| 97 void OnWillBeginEditing(); | 100 void OnWillBeginEditing(); |
| 98 | 101 |
| 99 // Called when editing ends in the field. | 102 // Called when editing ends in the field. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 167 |
| 165 // Tracking state before and after a possible change for reporting | 168 // Tracking state before and after a possible change for reporting |
| 166 // to model_. | 169 // to model_. |
| 167 NSRange selection_before_change_; | 170 NSRange selection_before_change_; |
| 168 std::wstring text_before_change_; | 171 std::wstring text_before_change_; |
| 169 | 172 |
| 170 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); | 173 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); |
| 171 }; | 174 }; |
| 172 | 175 |
| 173 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ | 176 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ |
| OLD | NEW |