| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 // Called when editing ends in the field. | 94 // Called when editing ends in the field. |
| 95 void OnDidEndEditing(); | 95 void OnDidEndEditing(); |
| 96 | 96 |
| 97 // Called when the window |field_| is in loses key to clean up | 97 // Called when the window |field_| is in loses key to clean up |
| 98 // visual state (such as closing the popup). | 98 // visual state (such as closing the popup). |
| 99 void OnDidResignKey(); | 99 void OnDidResignKey(); |
| 100 | 100 |
| 101 void AcceptInput(WindowOpenDisposition disposition, bool for_drop); | 101 void AcceptInput(WindowOpenDisposition disposition, bool for_drop); |
| 102 | 102 |
| 103 // Helper for LocationBarViewMac. Selects all in |field_|. | 103 // Helper for LocationBarBridge. |
| 104 void FocusLocation(); | 104 void FocusLocation(); |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 // Returns the field's currently selected range. Only valid if the | 107 // Returns the field's currently selected range. Only valid if the |
| 108 // field has focus. | 108 // field has focus. |
| 109 NSRange GetSelectedRange() const; | 109 NSRange GetSelectedRange() const; |
| 110 | 110 |
| 111 // Returns true if |field_| is first-responder in the window. Used | 111 // Returns true if |field_| is first-responder in the window. Used |
| 112 // in various DCHECKS to make sure code is running in appropriate | 112 // in various DCHECKS to make sure code is running in appropriate |
| 113 // situations. | 113 // situations. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 // Tracking state before and after a possible change for reporting | 153 // Tracking state before and after a possible change for reporting |
| 154 // to model_. | 154 // to model_. |
| 155 NSRange selection_before_change_; | 155 NSRange selection_before_change_; |
| 156 std::wstring text_before_change_; | 156 std::wstring text_before_change_; |
| 157 | 157 |
| 158 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); | 158 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ | 161 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ |
| OLD | NEW |