| 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 IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_IOS_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_IOS_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_IOS_H_ | 6 #define IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_IOS_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // voice search is not pending before attempting to process user actions that | 154 // voice search is not pending before attempting to process user actions that |
| 155 // may modify text field contents. | 155 // may modify text field contents. |
| 156 // TODO(crbug.com/303212): Remove this workaround once the crash is fixed. | 156 // TODO(crbug.com/303212): Remove this workaround once the crash is fixed. |
| 157 bool ShouldIgnoreUserInputDueToPendingVoiceSearch(); | 157 bool ShouldIgnoreUserInputDueToPendingVoiceSearch(); |
| 158 | 158 |
| 159 ios::ChromeBrowserState* browser_state_; | 159 ios::ChromeBrowserState* browser_state_; |
| 160 | 160 |
| 161 base::scoped_nsobject<OmniboxTextFieldIOS> field_; | 161 base::scoped_nsobject<OmniboxTextFieldIOS> field_; |
| 162 WebOmniboxEditController* controller_; // weak, owns us | 162 WebOmniboxEditController* controller_; // weak, owns us |
| 163 std::unique_ptr<OmniboxPopupViewIOS> popup_view_; | 163 std::unique_ptr<OmniboxPopupViewIOS> popup_view_; |
| 164 id<PreloadProvider> preloader_; | 164 // |preloader_| should be __weak but is included from non-ARC code. |
| 165 __unsafe_unretained id<PreloadProvider> preloader_; |
| 165 | 166 |
| 166 State state_before_change_; | 167 State state_before_change_; |
| 167 base::scoped_nsobject<NSString> marked_text_before_change_; | 168 base::scoped_nsobject<NSString> marked_text_before_change_; |
| 168 NSRange current_selection_; | 169 NSRange current_selection_; |
| 169 NSRange old_selection_; | 170 NSRange old_selection_; |
| 170 | 171 |
| 171 // TODO(rohitrao): This is a monster hack, needed because closing the popup | 172 // TODO(rohitrao): This is a monster hack, needed because closing the popup |
| 172 // ends up inadvertently triggering a new round of autocomplete. Fix the | 173 // ends up inadvertently triggering a new round of autocomplete. Fix the |
| 173 // underlying problem, which is that textDidChange: is called when closing the | 174 // underlying problem, which is that textDidChange: is called when closing the |
| 174 // popup, and then remove this hack. b/5877366. | 175 // popup, and then remove this hack. b/5877366. |
| 175 BOOL ignore_popup_updates_; | 176 BOOL ignore_popup_updates_; |
| 176 | 177 |
| 177 // Bridges delegate method calls from |field_| to C++ land. | 178 // Bridges delegate method calls from |field_| to C++ land. |
| 178 base::scoped_nsobject<AutocompleteTextFieldDelegate> field_delegate_; | 179 base::scoped_nsobject<AutocompleteTextFieldDelegate> field_delegate_; |
| 179 | 180 |
| 180 // Temporary pointer to the attributed display string, stored as color and | 181 // Temporary pointer to the attributed display string, stored as color and |
| 181 // other emphasis attributes are applied by the superclass. | 182 // other emphasis attributes are applied by the superclass. |
| 182 NSMutableAttributedString* attributing_display_string_; // weak | 183 NSMutableAttributedString* attributing_display_string_; // weak |
| 183 }; | 184 }; |
| 184 | 185 |
| 185 #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_IOS_H_ | 186 #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_IOS_H_ |
| OLD | NEW |