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