Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Side by Side Diff: ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm

Issue 2891653003: [omnibox] Break out SetCaretPos() method and enhance browser test (Closed)
Patch Set: Better Mac call Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "ios/chrome/browser/ui/omnibox/omnibox_view_ios.h" 5 #include "ios/chrome/browser/ui/omnibox/omnibox_view_ios.h"
6 6
7 #import <CoreText/CoreText.h> 7 #import <CoreText/CoreText.h>
8 #import <MobileCoreServices/MobileCoreServices.h> 8 #import <MobileCoreServices/MobileCoreServices.h>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 NSAttributedString* as = ApplyTextAttributes(text); 235 NSAttributedString* as = ApplyTextAttributes(text);
236 [field_ setText:as userTextLength:[as length]]; 236 [field_ setText:as userTextLength:[as length]];
237 237
238 if (update_popup) 238 if (update_popup)
239 UpdatePopup(); 239 UpdatePopup();
240 240
241 if (notify_text_changed) 241 if (notify_text_changed)
242 model()->OnChanged(); 242 model()->OnChanged();
243 } 243 }
244 244
245 void OmniboxViewIOS::SetCaretPos(size_t caret_pos) {}
Peter Kasting 2017/05/18 18:38:34 Is this NOTIMPLEMENTED(), or is there a reason why
Kevin Bailey 2017/05/18 19:48:17 I assume this is for Rohit? You saw his comment?
Peter Kasting 2017/05/18 19:50:10 Yes.
rohitrao (ping after 24h) 2017/05/23 14:02:39 This used to be impossible with the APIs that iOS
Kevin Bailey 2017/05/23 14:16:19 SetWindowTextAndCaretPos() is called during most a
246
245 void OmniboxViewIOS::RevertAll() { 247 void OmniboxViewIOS::RevertAll() {
246 ignore_popup_updates_ = true; 248 ignore_popup_updates_ = true;
247 OmniboxView::RevertAll(); 249 OmniboxView::RevertAll();
248 ignore_popup_updates_ = false; 250 ignore_popup_updates_ = false;
249 } 251 }
250 252
251 void OmniboxViewIOS::UpdatePopup() { 253 void OmniboxViewIOS::UpdatePopup() {
252 model()->SetInputInProgress(true); 254 model()->SetInputInProgress(true);
253 255
254 if (!model()->has_focus()) 256 if (!model()->has_focus())
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 // is being left out for now because it was not present before the OmniboxView 887 // is being left out for now because it was not present before the OmniboxView
886 // rewrite. 888 // rewrite.
887 #if 0 889 #if 0
888 // When editing is in progress, the url text is not colored, so there is 890 // When editing is in progress, the url text is not colored, so there is
889 // nothing to emphasize. (Calling SetText() in that situation would also be 891 // nothing to emphasize. (Calling SetText() in that situation would also be
890 // harmful, as it would reset the carat position to the end of the text.) 892 // harmful, as it would reset the carat position to the end of the text.)
891 if (!IsEditingOrEmpty()) 893 if (!IsEditingOrEmpty())
892 SetText(GetText()); 894 SetText(GetText());
893 #endif 895 #endif
894 } 896 }
OLDNEW
« components/omnibox/browser/omnibox_view.h ('K') | « ios/chrome/browser/ui/omnibox/omnibox_view_ios.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698