| 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 3780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3791 inBackground:inBackground | 3791 inBackground:inBackground |
| 3792 appendTo:kLastTab]); | 3792 appendTo:kLastTab]); |
| 3793 [self chromeExecuteCommand:command]; | 3793 [self chromeExecuteCommand:command]; |
| 3794 } | 3794 } |
| 3795 | 3795 |
| 3796 - (void)loadSessionTab:(const sessions::SessionTab*)sessionTab { | 3796 - (void)loadSessionTab:(const sessions::SessionTab*)sessionTab { |
| 3797 [[_model currentTab] loadSessionTab:sessionTab]; | 3797 [[_model currentTab] loadSessionTab:sessionTab]; |
| 3798 } | 3798 } |
| 3799 | 3799 |
| 3800 - (void)openJavascript:(NSString*)javascript { | 3800 - (void)openJavascript:(NSString*)javascript { |
| 3801 [[_model currentTab] openJavascript:javascript]; | 3801 DCHECK(javascript); |
| 3802 javascript = [javascript stringByRemovingPercentEncoding]; |
| 3803 web::WebState* webState = [[_model currentTab] webState]; |
| 3804 if (webState) { |
| 3805 webState->ExecuteJavaScript(base::SysNSStringToUTF16(javascript)); |
| 3806 } |
| 3802 } | 3807 } |
| 3803 | 3808 |
| 3804 #pragma mark - WebToolbarDelegate methods | 3809 #pragma mark - WebToolbarDelegate methods |
| 3805 | 3810 |
| 3806 - (IBAction)locationBarDidBecomeFirstResponder:(id)sender { | 3811 - (IBAction)locationBarDidBecomeFirstResponder:(id)sender { |
| 3807 if (_locationBarHasFocus) | 3812 if (_locationBarHasFocus) |
| 3808 return; // TODO(crbug.com/244366): This should not be necessary. | 3813 return; // TODO(crbug.com/244366): This should not be necessary. |
| 3809 _locationBarHasFocus = YES; | 3814 _locationBarHasFocus = YES; |
| 3810 [[NSNotificationCenter defaultCenter] | 3815 [[NSNotificationCenter defaultCenter] |
| 3811 postNotificationName:ios_internal:: | 3816 postNotificationName:ios_internal:: |
| (...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5134 | 5139 |
| 5135 - (UIView*)voiceSearchButton { | 5140 - (UIView*)voiceSearchButton { |
| 5136 return _voiceSearchButton; | 5141 return _voiceSearchButton; |
| 5137 } | 5142 } |
| 5138 | 5143 |
| 5139 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5144 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
| 5140 return [self currentLogoAnimationControllerOwner]; | 5145 return [self currentLogoAnimationControllerOwner]; |
| 5141 } | 5146 } |
| 5142 | 5147 |
| 5143 @end | 5148 @end |
| OLD | NEW |