| 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 | 432 |
| 433 // A single infobar container handles all infobars in all tabs. It keeps | 433 // A single infobar container handles all infobars in all tabs. It keeps |
| 434 // track of infobars for current tab (accessed via infobar helper of | 434 // track of infobars for current tab (accessed via infobar helper of |
| 435 // the current tab). | 435 // the current tab). |
| 436 std::unique_ptr<InfoBarContainerIOS> _infoBarContainer; | 436 std::unique_ptr<InfoBarContainerIOS> _infoBarContainer; |
| 437 | 437 |
| 438 // Bridge class to deliver container change notifications to BVC. | 438 // Bridge class to deliver container change notifications to BVC. |
| 439 std::unique_ptr<InfoBarContainerDelegateIOS> _infoBarContainerDelegate; | 439 std::unique_ptr<InfoBarContainerDelegateIOS> _infoBarContainerDelegate; |
| 440 | 440 |
| 441 // Voice search bar at the bottom of the view overlayed on |_contentArea| | 441 // Voice search bar at the bottom of the view overlayed on |_contentArea| |
| 442 // when displaying voice search results. Implementation is not complete. | 442 // when displaying voice search results. |
| 443 // See b/7998125. | |
| 444 base::scoped_nsprotocol<UIView<VoiceSearchBar>*> _voiceSearchBar; | 443 base::scoped_nsprotocol<UIView<VoiceSearchBar>*> _voiceSearchBar; |
| 445 | 444 |
| 446 // The image fetcher used to save images and perform image-based searches. | 445 // The image fetcher used to save images and perform image-based searches. |
| 447 std::unique_ptr<web::ImageDataFetcher> _imageFetcher; | 446 std::unique_ptr<web::ImageDataFetcher> _imageFetcher; |
| 448 | 447 |
| 449 // Card side swipe view. | 448 // Card side swipe view. |
| 450 base::scoped_nsobject<CardSideSwipeView> _sideSwipeView; | 449 base::scoped_nsobject<CardSideSwipeView> _sideSwipeView; |
| 451 | 450 |
| 452 // Used to cache value of |hasModeToggleSwitch| if set before the tab strip | 451 // Used to cache value of |hasModeToggleSwitch| if set before the tab strip |
| 453 // controller has been created. | 452 // controller has been created. |
| (...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2286 } | 2285 } |
| 2287 } | 2286 } |
| 2288 | 2287 |
| 2289 - (void)ensureVoiceSearchBarCreated { | 2288 - (void)ensureVoiceSearchBarCreated { |
| 2290 if (_voiceSearchBar) | 2289 if (_voiceSearchBar) |
| 2291 return; | 2290 return; |
| 2292 | 2291 |
| 2293 CGFloat width = CGRectGetWidth([[self view] bounds]); | 2292 CGFloat width = CGRectGetWidth([[self view] bounds]); |
| 2294 CGFloat y = CGRectGetHeight([[self view] bounds]) - kVoiceSearchBarHeight; | 2293 CGFloat y = CGRectGetHeight([[self view] bounds]) - kVoiceSearchBarHeight; |
| 2295 CGRect frame = CGRectMake(0.0, y, width, kVoiceSearchBarHeight); | 2294 CGRect frame = CGRectMake(0.0, y, width, kVoiceSearchBarHeight); |
| 2296 _voiceSearchBar.reset(ios::GetChromeBrowserProvider() | 2295 _voiceSearchBar.reset([ios::GetChromeBrowserProvider() |
| 2297 ->GetVoiceSearchProvider() | 2296 ->GetVoiceSearchProvider() |
| 2298 ->CreateVoiceSearchBar(frame)); | 2297 ->BuildVoiceSearchBar(frame) retain]); |
| 2299 [_voiceSearchBar setVoiceSearchBarDelegate:self]; | 2298 [_voiceSearchBar setVoiceSearchBarDelegate:self]; |
| 2300 [_voiceSearchBar setHidden:YES]; | 2299 [_voiceSearchBar setHidden:YES]; |
| 2301 [_voiceSearchBar setAutoresizingMask:UIViewAutoresizingFlexibleTopMargin | | 2300 [_voiceSearchBar setAutoresizingMask:UIViewAutoresizingFlexibleTopMargin | |
| 2302 UIViewAutoresizingFlexibleWidth]; | 2301 UIViewAutoresizingFlexibleWidth]; |
| 2303 [self.view insertSubview:_voiceSearchBar | 2302 [self.view insertSubview:_voiceSearchBar |
| 2304 belowSubview:_infoBarContainer->view()]; | 2303 belowSubview:_infoBarContainer->view()]; |
| 2305 } | 2304 } |
| 2306 | 2305 |
| 2307 - (void)updateVoiceSearchBarVisibilityAnimated:(BOOL)animated { | 2306 - (void)updateVoiceSearchBarVisibilityAnimated:(BOOL)animated { |
| 2308 // Voice search bar exists and is shown/hidden. | 2307 // Voice search bar exists and is shown/hidden. |
| (...skipping 2819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5128 | 5127 |
| 5129 - (UIView*)voiceSearchButton { | 5128 - (UIView*)voiceSearchButton { |
| 5130 return _voiceSearchButton; | 5129 return _voiceSearchButton; |
| 5131 } | 5130 } |
| 5132 | 5131 |
| 5133 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5132 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
| 5134 return [self currentLogoAnimationControllerOwner]; | 5133 return [self currentLogoAnimationControllerOwner]; |
| 5135 } | 5134 } |
| 5136 | 5135 |
| 5137 @end | 5136 @end |
| OLD | NEW |