OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/settings/sync_encryption_passphrase_collection_vi
ew_controller.h" | 5 #import "ios/chrome/browser/ui/settings/sync_encryption_passphrase_collection_vi
ew_controller.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/i18n/time_formatting.h" | 9 #include "base/i18n/time_formatting.h" |
10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 #import "ios/chrome/browser/ui/settings/cells/byo_textfield_item.h" | 32 #import "ios/chrome/browser/ui/settings/cells/byo_textfield_item.h" |
33 #import "ios/chrome/browser/ui/settings/cells/card_multiline_item.h" | 33 #import "ios/chrome/browser/ui/settings/cells/card_multiline_item.h" |
34 #import "ios/chrome/browser/ui/settings/cells/passphrase_error_item.h" | 34 #import "ios/chrome/browser/ui/settings/cells/passphrase_error_item.h" |
35 #import "ios/chrome/browser/ui/settings/settings_navigation_controller.h" | 35 #import "ios/chrome/browser/ui/settings/settings_navigation_controller.h" |
36 #import "ios/chrome/browser/ui/settings/settings_utils.h" | 36 #import "ios/chrome/browser/ui/settings/settings_utils.h" |
37 #import "ios/chrome/browser/ui/sync/sync_util.h" | 37 #import "ios/chrome/browser/ui/sync/sync_util.h" |
38 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 38 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
39 #include "ios/chrome/grit/ios_strings.h" | 39 #include "ios/chrome/grit/ios_strings.h" |
40 #import "ios/public/provider/chrome/browser/signin/chrome_identity.h" | 40 #import "ios/public/provider/chrome/browser/signin/chrome_identity.h" |
41 #import "ios/third_party/material_components_ios/src/components/Typography/src/M
aterialTypography.h" | 41 #import "ios/third_party/material_components_ios/src/components/Typography/src/M
aterialTypography.h" |
42 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF
ontLoader.h" | |
43 #include "ui/base/l10n/l10n_util.h" | 42 #include "ui/base/l10n/l10n_util.h" |
44 #include "ui/base/l10n/l10n_util_mac.h" | 43 #include "ui/base/l10n/l10n_util_mac.h" |
45 #include "url/gurl.h" | 44 #include "url/gurl.h" |
46 | 45 |
47 #if !defined(__has_feature) || !__has_feature(objc_arc) | 46 #if !defined(__has_feature) || !__has_feature(objc_arc) |
48 #error "This file requires ARC support." | 47 #error "This file requires ARC support." |
49 #endif | 48 #endif |
50 | 49 |
51 using namespace ios_internal::sync_encryption_passphrase; | 50 using namespace ios_internal::sync_encryption_passphrase; |
52 | 51 |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 - (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView | 312 - (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView |
314 cellForItemAtIndexPath:(NSIndexPath*)indexPath { | 313 cellForItemAtIndexPath:(NSIndexPath*)indexPath { |
315 UICollectionViewCell* cell = | 314 UICollectionViewCell* cell = |
316 [super collectionView:collectionView cellForItemAtIndexPath:indexPath]; | 315 [super collectionView:collectionView cellForItemAtIndexPath:indexPath]; |
317 CollectionViewItem* item = | 316 CollectionViewItem* item = |
318 [self.collectionViewModel itemAtIndexPath:indexPath]; | 317 [self.collectionViewModel itemAtIndexPath:indexPath]; |
319 if (item.type == ItemTypeMessage) { | 318 if (item.type == ItemTypeMessage) { |
320 CardMultilineCell* messageCell = | 319 CardMultilineCell* messageCell = |
321 base::mac::ObjCCastStrict<CardMultilineCell>(cell); | 320 base::mac::ObjCCastStrict<CardMultilineCell>(cell); |
322 messageCell.textLabel.font = | 321 messageCell.textLabel.font = |
323 [[MDFRobotoFontLoader sharedInstance] mediumFontOfSize:14]; | 322 [[MDCTypography fontLoader] mediumFontOfSize:14]; |
324 } | 323 } |
325 return cell; | 324 return cell; |
326 } | 325 } |
327 | 326 |
328 #pragma mark - UICollectionViewDelegate | 327 #pragma mark - UICollectionViewDelegate |
329 | 328 |
330 - (void)collectionView:(UICollectionView*)collectionView | 329 - (void)collectionView:(UICollectionView*)collectionView |
331 didSelectItemAtIndexPath:(NSIndexPath*)indexPath { | 330 didSelectItemAtIndexPath:(NSIndexPath*)indexPath { |
332 [super collectionView:collectionView didSelectItemAtIndexPath:indexPath]; | 331 [super collectionView:collectionView didSelectItemAtIndexPath:indexPath]; |
333 NSInteger itemType = | 332 NSInteger itemType = |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 self.navigationController) popViewControllerOrCloseSettingsAnimated:NO]; | 565 self.navigationController) popViewControllerOrCloseSettingsAnimated:NO]; |
567 } | 566 } |
568 | 567 |
569 #pragma mark - SettingsControllerProtocol callbacks | 568 #pragma mark - SettingsControllerProtocol callbacks |
570 | 569 |
571 - (void)settingsWillBeDismissed { | 570 - (void)settingsWillBeDismissed { |
572 [self stopObserving]; | 571 [self stopObserving]; |
573 } | 572 } |
574 | 573 |
575 @end | 574 @end |
OLD | NEW |