-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Safety Check iOS: Modify settings_password_check_cell for safety check
The custom cell for password check is similar to the one needed for safety check. It is being renamed to settings_check_cell for more general use. The main difference is the whether or not an image is used on the leading side of the cell. This CL adds an optional image to the leading side of the cell for compatibility with both checks. Bug: 1078782 Change-Id: I825bdcb53f624ce2e567a68dc900bddc310dc270 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2273162 Commit-Queue: Sean Harrison <harrisonsean@chromium.org> Reviewed-by: Gauthier Ambard <gambard@chromium.org> Reviewed-by: Javier Ernesto Flores Robles <javierrobles@chromium.org> Cr-Commit-Position: refs/heads/master@{#785836}
- Loading branch information
harrisonsean
authored and
Commit Bot
committed
Jul 7, 2020
1 parent
a7d2baf
commit f776805
Showing
11 changed files
with
314 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
ios/chrome/browser/ui/settings/cells/settings_check_cell.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_SETTINGS_CHECK_CELL_H_ | ||
#define IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_SETTINGS_CHECK_CELL_H_ | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
#import "ios/chrome/browser/ui/table_view/cells/table_view_cell.h" | ||
|
||
// Cell representation for SettingsCheckItem. | ||
// +---------------------------------------------------------+ | ||
// | +--------+ | | ||
// | +--------+ |trailing| | | ||
// | | leading| One line title |image or| | | ||
// | | image | Multiline detail text |spinner | | | ||
// | +--------+ +--------+ | | ||
// +---------------------------------------------------------+ | ||
@interface SettingsCheckCell : TableViewCell | ||
|
||
// Shows |activityIndicator| and starts animation. It will hide |imageView| if | ||
// it was shown. | ||
- (void)showActivityIndicator; | ||
|
||
// Hides |activityIndicator| and stops animation. | ||
- (void)hideActivityIndicator; | ||
|
||
// Sets the |trailingImage| and tint |trailingColor| for it that should be | ||
// displayed at the trailing edge of the cell. If set to nil, |trailingImage| | ||
// will be hidden, otherwise |imageView| will be shown and |activityIndicator| | ||
// will be hidden. | ||
- (void)setTrailingImage:(UIImage*)trailingImage | ||
withTintColor:(UIColor*)tintColor; | ||
|
||
// Sets the [leadingImage] and tint [leadingColor] for it that should be | ||
// displayed at the leading edge of the cell. If set to nil, the image is | ||
// hidden. | ||
- (void)setLeadingImage:(UIImage*)leadingImage | ||
withTintColor:(UIColor*)tintColor; | ||
|
||
@end | ||
|
||
#endif // IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_SETTINGS_CHECK_CELL_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.