| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // visual state (such as closing the popup). | 109 // visual state (such as closing the popup). |
| 110 void OnDidResignKey(); | 110 void OnDidResignKey(); |
| 111 | 111 |
| 112 // Called when the user attempts to paste into |field_|. | 112 // Called when the user attempts to paste into |field_|. |
| 113 void OnPaste(); | 113 void OnPaste(); |
| 114 | 114 |
| 115 // Checks if a keyword search is possible and forwards to |model_| | 115 // Checks if a keyword search is possible and forwards to |model_| |
| 116 // if so. Returns true if the tab should be eaten. | 116 // if so. Returns true if the tab should be eaten. |
| 117 bool OnTabPressed(); | 117 bool OnTabPressed(); |
| 118 | 118 |
| 119 // Called when the user hits backspace in |field_|. Checks whether |
| 120 // keyword search is being terminated. Returns true if the |
| 121 // backspace should be intercepted (not forwarded on to the standard |
| 122 // machinery). |
| 123 bool OnBackspacePressed(); |
| 124 |
| 119 void AcceptInput(WindowOpenDisposition disposition, bool for_drop); | 125 void AcceptInput(WindowOpenDisposition disposition, bool for_drop); |
| 120 | 126 |
| 121 // Helper for LocationBarViewMac. Selects all in |field_|. | 127 // Helper for LocationBarViewMac. Selects all in |field_|. |
| 122 void FocusLocation(); | 128 void FocusLocation(); |
| 123 | 129 |
| 124 // Helper to get appropriate contents from |clipboard|. Returns | 130 // Helper to get appropriate contents from |clipboard|. Returns |
| 125 // empty string if no appropriate data is found on |clipboard|. | 131 // empty string if no appropriate data is found on |clipboard|. |
| 126 static std::wstring GetClipboardText(Clipboard* clipboard); | 132 static std::wstring GetClipboardText(Clipboard* clipboard); |
| 127 | 133 |
| 128 private: | 134 private: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 180 |
| 175 // Tracking state before and after a possible change for reporting | 181 // Tracking state before and after a possible change for reporting |
| 176 // to model_. | 182 // to model_. |
| 177 NSRange selection_before_change_; | 183 NSRange selection_before_change_; |
| 178 std::wstring text_before_change_; | 184 std::wstring text_before_change_; |
| 179 | 185 |
| 180 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); | 186 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); |
| 181 }; | 187 }; |
| 182 | 188 |
| 183 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ | 189 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ |
| OLD | NEW |