| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void OpenMatch(const AutocompleteMatch& match, | 59 void OpenMatch(const AutocompleteMatch& match, |
| 60 WindowOpenDisposition disposition, | 60 WindowOpenDisposition disposition, |
| 61 const GURL& alternate_nav_url, | 61 const GURL& alternate_nav_url, |
| 62 const base::string16& pasted_text, | 62 const base::string16& pasted_text, |
| 63 size_t selected_line) override; | 63 size_t selected_line) override; |
| 64 base::string16 GetText() const override; | 64 base::string16 GetText() const override; |
| 65 void SetWindowTextAndCaretPos(const base::string16& text, | 65 void SetWindowTextAndCaretPos(const base::string16& text, |
| 66 size_t caret_pos, | 66 size_t caret_pos, |
| 67 bool update_popup, | 67 bool update_popup, |
| 68 bool notify_text_changed) override; | 68 bool notify_text_changed) override; |
| 69 void SetForcedQuery() override; | 69 void EnterKeywordModeForDefaultSearchProvider() override; |
| 70 bool IsSelectAll() const override; | 70 bool IsSelectAll() const override; |
| 71 bool DeleteAtEndPressed() override; | 71 bool DeleteAtEndPressed() override; |
| 72 void GetSelectionBounds(base::string16::size_type* start, | 72 void GetSelectionBounds(base::string16::size_type* start, |
| 73 base::string16::size_type* end) const override; | 73 base::string16::size_type* end) const override; |
| 74 void SelectAll(bool reversed) override; | 74 void SelectAll(bool reversed) override; |
| 75 void RevertAll() override; | 75 void RevertAll() override; |
| 76 void UpdatePopup() override; | 76 void UpdatePopup() override; |
| 77 void CloseOmniboxPopup() override; | 77 void CloseOmniboxPopup() override; |
| 78 void SetFocus() override; | 78 void SetFocus() override; |
| 79 void ApplyCaretVisibility() override; | 79 void ApplyCaretVisibility() override; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 AutocompleteTextField* field_; // owned by tab controller | 207 AutocompleteTextField* field_; // owned by tab controller |
| 208 | 208 |
| 209 // Selection at the point where the user started using the | 209 // Selection at the point where the user started using the |
| 210 // arrows to move around in the popup. | 210 // arrows to move around in the popup. |
| 211 NSRange saved_temporary_selection_; | 211 NSRange saved_temporary_selection_; |
| 212 | 212 |
| 213 // Tracking state before and after a possible change for reporting | 213 // Tracking state before and after a possible change for reporting |
| 214 // to model_. | 214 // to model_. |
| 215 NSRange selection_before_change_; | 215 NSRange selection_before_change_; |
| 216 base::string16 text_before_change_; | 216 base::string16 text_before_change_; |
| 217 base::string16 keyword_before_change_; |
| 218 bool is_keyword_selected_before_change_; |
| 217 NSRange marked_range_before_change_; | 219 NSRange marked_range_before_change_; |
| 218 | 220 |
| 219 // Was delete pressed? | 221 // Was delete pressed? |
| 220 bool delete_was_pressed_; | 222 bool delete_was_pressed_; |
| 221 | 223 |
| 222 // Was the delete key pressed with an empty selection at the end of the edit? | 224 // Was the delete key pressed with an empty selection at the end of the edit? |
| 223 bool delete_at_end_pressed_; | 225 bool delete_at_end_pressed_; |
| 224 | 226 |
| 225 base::string16 suggest_text_; | 227 base::string16 suggest_text_; |
| 226 | 228 |
| 227 // State used to coalesce changes to text and selection to avoid drawing | 229 // State used to coalesce changes to text and selection to avoid drawing |
| 228 // transient state. | 230 // transient state. |
| 229 bool in_coalesced_update_block_; | 231 bool in_coalesced_update_block_; |
| 230 bool do_coalesced_text_update_; | 232 bool do_coalesced_text_update_; |
| 231 base::string16 coalesced_text_update_; | 233 base::string16 coalesced_text_update_; |
| 232 bool do_coalesced_range_update_; | 234 bool do_coalesced_range_update_; |
| 233 NSRange coalesced_range_update_; | 235 NSRange coalesced_range_update_; |
| 234 | 236 |
| 235 // The time of the first character insert operation that has not yet been | 237 // The time of the first character insert operation that has not yet been |
| 236 // painted. Used to measure omnibox responsiveness with a histogram. | 238 // painted. Used to measure omnibox responsiveness with a histogram. |
| 237 base::TimeTicks insert_char_time_; | 239 base::TimeTicks insert_char_time_; |
| 238 | 240 |
| 239 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); | 241 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); |
| 240 }; | 242 }; |
| 241 | 243 |
| 242 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ | 244 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ |
| OLD | NEW |