FontAccess: Implement a "Select All" feature for the font chooser
Implements the ability to select all fonts in the font chooser as a
checkbox. Unselecting the checkbox will cause all selection to
disappear.
Bug: 1159246
Change-Id: Ia3ecda193457a70e8c5b3282362c4439945943ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2594510
Commit-Queue: Olivier Yiptong <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#838471}
diff --git a/chrome/browser/chooser_controller/chooser_controller.h b/chrome/browser/chooser_controller/chooser_controller.h
index 304514df..119ee81 100644
--- a/chrome/browser/chooser_controller/chooser_controller.h
+++ b/chrome/browser/chooser_controller/chooser_controller.h
@@ -79,6 +79,9 @@
// Returns whether the chooser allows multiple items to be selected.
virtual bool AllowMultipleSelection() const;
+ // Returns whether the chooser needs to show a select-all checkbox.
+ virtual bool ShouldShowSelectAllCheckbox() const;
+
// Returns the text to be displayed in the chooser when there are no options.
virtual base::string16 GetNoOptionsText() const = 0;
@@ -88,6 +91,9 @@
// Returns the label for Cancel button.
virtual base::string16 GetCancelButtonLabel() const;
+ // Returns the label for SelectAll checkbox.
+ virtual base::string16 GetSelectAllCheckboxLabel() const;
+
// Returns whether both OK and Cancel buttons are enabled.
//
// For chooser used in Web APIs such as WebBluetooth, WebUSB,