| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #import "ios/chrome/browser/ui/browser_view_controller.h" | 5 #import "ios/chrome/browser/ui/browser_view_controller.h" |
| 6 | 6 |
| 7 #import <AssetsLibrary/AssetsLibrary.h> | 7 #import <AssetsLibrary/AssetsLibrary.h> |
| 8 #import <MobileCoreServices/MobileCoreServices.h> | 8 #import <MobileCoreServices/MobileCoreServices.h> |
| 9 #import <PassKit/PassKit.h> | 9 #import <PassKit/PassKit.h> |
| 10 #import <Photos/Photos.h> | 10 #import <Photos/Photos.h> |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 | 428 |
| 429 // A single infobar container handles all infobars in all tabs. It keeps | 429 // A single infobar container handles all infobars in all tabs. It keeps |
| 430 // track of infobars for current tab (accessed via infobar helper of | 430 // track of infobars for current tab (accessed via infobar helper of |
| 431 // the current tab). | 431 // the current tab). |
| 432 std::unique_ptr<InfoBarContainerIOS> _infoBarContainer; | 432 std::unique_ptr<InfoBarContainerIOS> _infoBarContainer; |
| 433 | 433 |
| 434 // Bridge class to deliver container change notifications to BVC. | 434 // Bridge class to deliver container change notifications to BVC. |
| 435 std::unique_ptr<InfoBarContainerDelegateIOS> _infoBarContainerDelegate; | 435 std::unique_ptr<InfoBarContainerDelegateIOS> _infoBarContainerDelegate; |
| 436 | 436 |
| 437 // Voice search bar at the bottom of the view overlayed on |_contentArea| | 437 // Voice search bar at the bottom of the view overlayed on |_contentArea| |
| 438 // when displaying voice search results. Implementation is not complete. | 438 // when displaying voice search results. |
| 439 // See b/7998125. | |
| 440 base::scoped_nsprotocol<UIView<VoiceSearchBar>*> _voiceSearchBar; | 439 base::scoped_nsprotocol<UIView<VoiceSearchBar>*> _voiceSearchBar; |
| 441 | 440 |
| 442 // The image fetcher used to save images and perform image-based searches. | 441 // The image fetcher used to save images and perform image-based searches. |
| 443 std::unique_ptr<web::ImageDataFetcher> _imageFetcher; | 442 std::unique_ptr<web::ImageDataFetcher> _imageFetcher; |
| 444 | 443 |
| 445 // Card side swipe view. | 444 // Card side swipe view. |
| 446 base::scoped_nsobject<CardSideSwipeView> _sideSwipeView; | 445 base::scoped_nsobject<CardSideSwipeView> _sideSwipeView; |
| 447 | 446 |
| 448 // Used to cache value of |hasModeToggleSwitch| if set before the tab strip | 447 // Used to cache value of |hasModeToggleSwitch| if set before the tab strip |
| 449 // controller has been created. | 448 // controller has been created. |
| (...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2283 } | 2282 } |
| 2284 } | 2283 } |
| 2285 | 2284 |
| 2286 - (void)ensureVoiceSearchBarCreated { | 2285 - (void)ensureVoiceSearchBarCreated { |
| 2287 if (_voiceSearchBar) | 2286 if (_voiceSearchBar) |
| 2288 return; | 2287 return; |
| 2289 | 2288 |
| 2290 CGFloat width = CGRectGetWidth([[self view] bounds]); | 2289 CGFloat width = CGRectGetWidth([[self view] bounds]); |
| 2291 CGFloat y = CGRectGetHeight([[self view] bounds]) - kVoiceSearchBarHeight; | 2290 CGFloat y = CGRectGetHeight([[self view] bounds]) - kVoiceSearchBarHeight; |
| 2292 CGRect frame = CGRectMake(0.0, y, width, kVoiceSearchBarHeight); | 2291 CGRect frame = CGRectMake(0.0, y, width, kVoiceSearchBarHeight); |
| 2293 _voiceSearchBar.reset(ios::GetChromeBrowserProvider() | 2292 _voiceSearchBar.reset([ios::GetChromeBrowserProvider() |
| 2294 ->GetVoiceSearchProvider() | 2293 ->GetVoiceSearchProvider() |
| 2295 ->CreateVoiceSearchBar(frame)); | 2294 ->BuildVoiceSearchBar(frame) retain]); |
| 2296 [_voiceSearchBar setVoiceSearchBarDelegate:self]; | 2295 [_voiceSearchBar setVoiceSearchBarDelegate:self]; |
| 2297 [_voiceSearchBar setHidden:YES]; | 2296 [_voiceSearchBar setHidden:YES]; |
| 2298 [_voiceSearchBar setAutoresizingMask:UIViewAutoresizingFlexibleTopMargin | | 2297 [_voiceSearchBar setAutoresizingMask:UIViewAutoresizingFlexibleTopMargin | |
| 2299 UIViewAutoresizingFlexibleWidth]; | 2298 UIViewAutoresizingFlexibleWidth]; |
| 2300 [self.view insertSubview:_voiceSearchBar | 2299 [self.view insertSubview:_voiceSearchBar |
| 2301 belowSubview:_infoBarContainer->view()]; | 2300 belowSubview:_infoBarContainer->view()]; |
| 2302 } | 2301 } |
| 2303 | 2302 |
| 2304 - (void)updateVoiceSearchBarVisibilityAnimated:(BOOL)animated { | 2303 - (void)updateVoiceSearchBarVisibilityAnimated:(BOOL)animated { |
| 2305 // Voice search bar exists and is shown/hidden. | 2304 // Voice search bar exists and is shown/hidden. |
| (...skipping 2832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5138 | 5137 |
| 5139 - (UIView*)voiceSearchButton { | 5138 - (UIView*)voiceSearchButton { |
| 5140 return _voiceSearchButton; | 5139 return _voiceSearchButton; |
| 5141 } | 5140 } |
| 5142 | 5141 |
| 5143 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5142 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
| 5144 return [self currentLogoAnimationControllerOwner]; | 5143 return [self currentLogoAnimationControllerOwner]; |
| 5145 } | 5144 } |
| 5146 | 5145 |
| 5147 @end | 5146 @end |
| OLD | NEW |