| 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 4896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4907 | 4907 |
| 4908 // If all bookmarks are removed, update the toolbar so the star highlight is | 4908 // If all bookmarks are removed, update the toolbar so the star highlight is |
| 4909 // kept in sync. | 4909 // kept in sync. |
| 4910 - (void)allBookmarksRemoved { | 4910 - (void)allBookmarksRemoved { |
| 4911 [self updateToolbar]; | 4911 [self updateToolbar]; |
| 4912 } | 4912 } |
| 4913 | 4913 |
| 4914 #pragma mark - ShareToDelegate methods | 4914 #pragma mark - ShareToDelegate methods |
| 4915 | 4915 |
| 4916 - (void)shareDidComplete:(ShareTo::ShareResult)shareStatus | 4916 - (void)shareDidComplete:(ShareTo::ShareResult)shareStatus |
| 4917 successMessage:(NSString*)message { | 4917 completionMessage:(NSString*)message { |
| 4918 // The shareTo dialog dismisses itself instead of through | 4918 // The shareTo dialog dismisses itself instead of through |
| 4919 // |-dismissViewControllerAnimated:completion:| so we must reset the | 4919 // |-dismissViewControllerAnimated:completion:| so we must reset the |
| 4920 // presenting state here. | 4920 // presenting state here. |
| 4921 self.presenting = NO; | 4921 self.presenting = NO; |
| 4922 [self.dialogPresenter tryToPresent]; | 4922 [self.dialogPresenter tryToPresent]; |
| 4923 | 4923 |
| 4924 switch (shareStatus) { | 4924 switch (shareStatus) { |
| 4925 case ShareTo::SHARE_SUCCESS: | 4925 case ShareTo::SHARE_SUCCESS: |
| 4926 if ([message length]) { | 4926 if ([message length]) { |
| 4927 TriggerHapticFeedbackForNotification(UINotificationFeedbackTypeSuccess); | 4927 TriggerHapticFeedbackForNotification(UINotificationFeedbackTypeSuccess); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4942 break; | 4942 break; |
| 4943 case ShareTo::SHARE_CANCEL: | 4943 case ShareTo::SHARE_CANCEL: |
| 4944 case ShareTo::SHARE_UNKNOWN_RESULT: | 4944 case ShareTo::SHARE_UNKNOWN_RESULT: |
| 4945 break; | 4945 break; |
| 4946 } | 4946 } |
| 4947 } | 4947 } |
| 4948 | 4948 |
| 4949 - (void)passwordAppExDidFinish:(ShareTo::ShareResult)shareStatus | 4949 - (void)passwordAppExDidFinish:(ShareTo::ShareResult)shareStatus |
| 4950 username:(NSString*)username | 4950 username:(NSString*)username |
| 4951 password:(NSString*)password | 4951 password:(NSString*)password |
| 4952 successMessage:(NSString*)message { | 4952 completionMessage:(NSString*)message { |
| 4953 switch (shareStatus) { | 4953 switch (shareStatus) { |
| 4954 case ShareTo::SHARE_SUCCESS: { | 4954 case ShareTo::SHARE_SUCCESS: { |
| 4955 PasswordController* passwordController = | 4955 PasswordController* passwordController = |
| 4956 [[_model currentTab] passwordController]; | 4956 [[_model currentTab] passwordController]; |
| 4957 __block BOOL shown = NO; | 4957 __block BOOL shown = NO; |
| 4958 [passwordController findAndFillPasswordForms:username | 4958 [passwordController findAndFillPasswordForms:username |
| 4959 password:password | 4959 password:password |
| 4960 completionHandler:^(BOOL completed) { | 4960 completionHandler:^(BOOL completed) { |
| 4961 if (shown || !completed || ![message length]) | 4961 if (shown || !completed || ![message length]) |
| 4962 return; | 4962 return; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5101 | 5101 |
| 5102 - (UIView*)voiceSearchButton { | 5102 - (UIView*)voiceSearchButton { |
| 5103 return _voiceSearchButton; | 5103 return _voiceSearchButton; |
| 5104 } | 5104 } |
| 5105 | 5105 |
| 5106 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5106 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
| 5107 return [self currentLogoAnimationControllerOwner]; | 5107 return [self currentLogoAnimationControllerOwner]; |
| 5108 } | 5108 } |
| 5109 | 5109 |
| 5110 @end | 5110 @end |
| OLD | NEW |