| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 119 // Called when the user hits backspace in |field_|. Checks whether |
| 120 // keyword search is being terminated. Returns true if the | 120 // keyword search is being terminated. Returns true if the |
| 121 // backspace should be intercepted (not forwarded on to the standard | 121 // backspace should be intercepted (not forwarded on to the standard |
| 122 // machinery). | 122 // machinery). |
| 123 bool OnBackspacePressed(); | 123 bool OnBackspacePressed(); |
| 124 | 124 |
| 125 // Forward to same method in |popup_view_| model. Used when |
| 126 // Shift-Delete is pressed, to delete items from the popup. |
| 127 void TryDeletingCurrentItem(); |
| 128 |
| 125 void AcceptInput(WindowOpenDisposition disposition, bool for_drop); | 129 void AcceptInput(WindowOpenDisposition disposition, bool for_drop); |
| 126 | 130 |
| 127 // Helper for LocationBarViewMac. Selects all in |field_|. | 131 // Helper for LocationBarViewMac. Selects all in |field_|. |
| 128 void FocusLocation(); | 132 void FocusLocation(); |
| 129 | 133 |
| 130 // Helper to get appropriate contents from |clipboard|. Returns | 134 // Helper to get appropriate contents from |clipboard|. Returns |
| 131 // empty string if no appropriate data is found on |clipboard|. | 135 // empty string if no appropriate data is found on |clipboard|. |
| 132 static std::wstring GetClipboardText(Clipboard* clipboard); | 136 static std::wstring GetClipboardText(Clipboard* clipboard); |
| 133 | 137 |
| 134 private: | 138 private: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 184 |
| 181 // Tracking state before and after a possible change for reporting | 185 // Tracking state before and after a possible change for reporting |
| 182 // to model_. | 186 // to model_. |
| 183 NSRange selection_before_change_; | 187 NSRange selection_before_change_; |
| 184 std::wstring text_before_change_; | 188 std::wstring text_before_change_; |
| 185 | 189 |
| 186 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); | 190 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewMac); |
| 187 }; | 191 }; |
| 188 | 192 |
| 189 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ | 193 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_MAC_H_ |
| OLD | NEW |