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

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

Issue 2761343002: [ios] Adds LocationBarCoordinator. (Closed)
Patch Set: Rebased. Created 3 years, 8 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
« no previous file with comments | « no previous file | ios/clean/chrome/browser/ui/omnibox/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 id<OmniboxPopupPositioner> positioner) 173 id<OmniboxPopupPositioner> positioner)
174 : OmniboxView( 174 : OmniboxView(
175 controller, 175 controller,
176 base::MakeUnique<ChromeOmniboxClientIOS>(controller, browser_state)), 176 base::MakeUnique<ChromeOmniboxClientIOS>(controller, browser_state)),
177 browser_state_(browser_state), 177 browser_state_(browser_state),
178 field_(field), 178 field_(field),
179 controller_(controller), 179 controller_(controller),
180 preloader_(preloader), 180 preloader_(preloader),
181 ignore_popup_updates_(false), 181 ignore_popup_updates_(false),
182 attributing_display_string_(nil) { 182 attributing_display_string_(nil) {
183 DCHECK(field_);
183 popup_view_.reset(new OmniboxPopupViewIOS(this, model(), positioner)); 184 popup_view_.reset(new OmniboxPopupViewIOS(this, model(), positioner));
184 field_delegate_.reset( 185 field_delegate_.reset(
185 [[AutocompleteTextFieldDelegate alloc] initWithEditView:this]); 186 [[AutocompleteTextFieldDelegate alloc] initWithEditView:this]);
186 [field_ setDelegate:field_delegate_]; 187 [field_ setDelegate:field_delegate_];
187 [field_ addTarget:field_delegate_ 188 [field_ addTarget:field_delegate_
188 action:@selector(textFieldDidChange:) 189 action:@selector(textFieldDidChange:)
189 forControlEvents:UIControlEventEditingChanged]; 190 forControlEvents:UIControlEventEditingChanged];
190 } 191 }
191 192
192 OmniboxViewIOS::~OmniboxViewIOS() { 193 OmniboxViewIOS::~OmniboxViewIOS() {
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 // is being left out for now because it was not present before the OmniboxView 874 // is being left out for now because it was not present before the OmniboxView
874 // rewrite. 875 // rewrite.
875 #if 0 876 #if 0
876 // When editing is in progress, the url text is not colored, so there is 877 // When editing is in progress, the url text is not colored, so there is
877 // nothing to emphasize. (Calling SetText() in that situation would also be 878 // nothing to emphasize. (Calling SetText() in that situation would also be
878 // harmful, as it would reset the carat position to the end of the text.) 879 // harmful, as it would reset the carat position to the end of the text.)
879 if (!IsEditingOrEmpty()) 880 if (!IsEditingOrEmpty())
880 SetText(GetText()); 881 SetText(GetText());
881 #endif 882 #endif
882 } 883 }
OLDNEW
« no previous file with comments | « no previous file | ios/clean/chrome/browser/ui/omnibox/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698