Chromium Code Reviews| 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_dependency_factory.h" | 5 #import "ios/chrome/browser/ui/browser_view_controller_dependency_factory.h" |
| 6 | 6 |
| 7 #import <PassKit/PassKit.h> | 7 #import <PassKit/PassKit.h> |
| 8 | 8 |
| 9 #include "base/ios/ios_util.h" | 9 #include "base/ios/ios_util.h" |
| 10 #include "components/infobars/core/infobar_manager.h" | 10 #include "components/infobars/core/infobar_manager.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 | 45 |
| 46 - (PKAddPassesViewController*)newPassKitViewControllerForPass:(PKPass*)pass { | 46 - (PKAddPassesViewController*)newPassKitViewControllerForPass:(PKPass*)pass { |
| 47 return [[PKAddPassesViewController alloc] initWithPass:pass]; | 47 return [[PKAddPassesViewController alloc] initWithPass:pass]; |
| 48 } | 48 } |
| 49 | 49 |
| 50 - (void)showPassKitErrorInfoBarForManager: | 50 - (void)showPassKitErrorInfoBarForManager: |
| 51 (infobars::InfoBarManager*)infoBarManager { | 51 (infobars::InfoBarManager*)infoBarManager { |
| 52 DCHECK(infoBarManager); | 52 DCHECK(infoBarManager); |
| 53 SimpleAlertInfoBarDelegate::Create( | 53 SimpleAlertInfoBarDelegate::Create( |
| 54 infoBarManager, | 54 infoBarManager, |
| 55 infobars::InfoBarDelegate::SHOW_PASSKIT_INFOBAR_ERROR_DELEGATE, | 55 infobars::InfoBarDelegate::SHOW_PASSKIT_INFOBAR_ERROR_DELEGATE, nullptr, |
|
Peter Kasting
2017/02/24 02:12:27
Maybe this is another /!\ candidate.
Evan Stade
2017/02/24 17:18:16
no idea what this even is. "Sorry, your Pass canno
| |
| 56 infobars::InfoBarDelegate::kNoIconID, gfx::VectorIconId::VECTOR_ICON_NONE, | |
| 57 l10n_util::GetStringUTF16(IDS_IOS_GENERIC_PASSKIT_ERROR), true); | 56 l10n_util::GetStringUTF16(IDS_IOS_GENERIC_PASSKIT_ERROR), true); |
| 58 } | 57 } |
| 59 | 58 |
| 60 - (PreloadController*)newPreloadController { | 59 - (PreloadController*)newPreloadController { |
| 61 return [[PreloadController alloc] initWithBrowserState:browserState_]; | 60 return [[PreloadController alloc] initWithBrowserState:browserState_]; |
| 62 } | 61 } |
| 63 | 62 |
| 64 - (TabStripController*)newTabStripControllerWithTabModel:(TabModel*)model { | 63 - (TabStripController*)newTabStripControllerWithTabModel:(TabModel*)model { |
| 65 TabStrip::Style style = TabStrip::kStyleDark; | 64 TabStrip::Style style = TabStrip::kStyleDark; |
| 66 if (browserState_ && browserState_->IsOffTheRecord()) | 65 if (browserState_ && browserState_->IsOffTheRecord()) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 initWithBaseViewController:viewController | 102 initWithBaseViewController:viewController |
| 104 title:title | 103 title:title |
| 105 message:message] autorelease]; | 104 message:message] autorelease]; |
| 106 [alertCoordinator addItemWithTitle:l10n_util::GetNSString(IDS_OK) | 105 [alertCoordinator addItemWithTitle:l10n_util::GetNSString(IDS_OK) |
| 107 action:nil | 106 action:nil |
| 108 style:UIAlertActionStyleDefault]; | 107 style:UIAlertActionStyleDefault]; |
| 109 return alertCoordinator; | 108 return alertCoordinator; |
| 110 } | 109 } |
| 111 | 110 |
| 112 @end | 111 @end |
| OLD | NEW |