Chromium Code Reviews| Index: ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
| diff --git a/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm b/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
| index b036348e4ffefe4dcfe9f3301991a4e4522029f3..66f3955a3c96247af6435a0b8bcb08c483e9ef27 100644 |
| --- a/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
| +++ b/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
| @@ -41,6 +41,7 @@ |
| #import "ios/chrome/browser/ui/history/tab_history_popup_controller.h" |
| #import "ios/chrome/browser/ui/image_util.h" |
| #import "ios/chrome/browser/ui/keyboard/hardware_keyboard_watcher.h" |
| +#include "ios/chrome/browser/ui/omnibox/location_bar_controller_impl.h" |
| #include "ios/chrome/browser/ui/omnibox/omnibox_view_ios.h" |
| #import "ios/chrome/browser/ui/reversed_animation.h" |
| #include "ios/chrome/browser/ui/rtl_geometry.h" |
| @@ -58,6 +59,8 @@ |
| #import "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
| #import "ios/public/provider/chrome/browser/images/branded_image_provider.h" |
| #import "ios/public/provider/chrome/browser/voice/voice_search_provider.h" |
| +#include "ios/shared/chrome/browser/ui/omnibox/location_bar_controller.h" |
| +#include "ios/shared/chrome/browser/ui/omnibox/location_bar_delegate.h" |
| #import "ios/third_party/material_components_ios/src/components/Palettes/src/MaterialPalettes.h" |
| #import "ios/third_party/material_components_ios/src/components/ProgressView/src/MaterialProgressView.h" |
| #import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h" |
| @@ -256,7 +259,7 @@ CGRect RectShiftedDownAndResizedForStatusBar(CGRect rect) { |
| base::scoped_nsobject<UIImageView> _incognitoIcon; |
| base::scoped_nsobject<UIView> _clippingView; |
| - std::unique_ptr<LocationBarViewIOS> _locationBar; |
| + std::unique_ptr<LocationBarController> _locationBar; |
| BOOL _initialLayoutComplete; |
| // If |YES|, toolbar is incognito. |
| BOOL _incognito; |
| @@ -595,8 +598,8 @@ CGRect RectShiftedDownAndResizedForStatusBar(CGRect rect) { |
| [_webToolbar setAutoresizingMask:UIViewAutoresizingFlexibleWidth | |
| UIViewAutoresizingFlexibleBottomMargin]; |
| [_webToolbar setFrame:[self specificControlsArea]]; |
| - _locationBar.reset( |
| - new LocationBarViewIOS(_omniBox, _browserState, preloader, self, self)); |
| + _locationBar.reset(new LocationBarControllerImpl(_omniBox, _browserState, |
|
sdefresne
2017/04/04 13:58:16
nit: use base::MakeUnique if possible
_location
rohitrao (ping after 24h)
2017/04/04 14:32:29
Done.
|
| + preloader, self, self)); |
| // Create the determinate progress bar (phone only). |
| if (idiom == IPHONE_IDIOM) { |
| @@ -1975,10 +1978,6 @@ CGRect RectShiftedDownAndResizedForStatusBar(CGRect rect) { |
| [_keyboardVoiceSearchButton setHidden:YES]; |
| } |
| -- (LocationBarViewIOS*)locationBar { |
| - return _locationBar.get(); |
| -} |
| - |
| - (CGFloat)omniboxLeading { |
| // Compute what the leading (x-origin) position for the omniboox should be |
| // based on what other controls are active. |