Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5075)

Unified Diff: chrome/browser/chooser_controller/chooser_controller.h

Issue 2518933004: Add multiple selection support to chooser on desktops (Closed)
Patch Set: address comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chooser_controller/chooser_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chooser_controller/chooser_controller.h
diff --git a/chrome/browser/chooser_controller/chooser_controller.h b/chrome/browser/chooser_controller/chooser_controller.h
index 5faceec34bec860d6bcb273b7389fe8b3581ca45..f2ed9780589e258438296264601717ff405f25c7 100644
--- a/chrome/browser/chooser_controller/chooser_controller.h
+++ b/chrome/browser/chooser_controller/chooser_controller.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_
#define CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_
+#include <vector>
+
#include "base/macros.h"
#include "base/strings/string16.h"
@@ -66,6 +68,9 @@ class ChooserController {
// For WebBluetooth, it is a signal strength icon.
virtual bool ShouldShowIconBeforeText() const;
+ // Returns if the chooser allows multiple items to be selected.
+ virtual bool AllowMultipleSelection() const;
+
// Returns the text to be displayed in the chooser when there are no options.
virtual base::string16 GetNoOptionsText() const = 0;
@@ -101,8 +106,9 @@ class ChooserController {
// These three functions are called just before this object is destroyed:
- // Called when the user selects the |index|th element from the dialog.
- virtual void Select(size_t index) = 0;
+ // Called when the user selects elements from the dialog. |indices| contains
+ // the indices of the selected elements.
+ virtual void Select(const std::vector<size_t>& indices) = 0;
// Called when the user presses the 'Cancel' button in the dialog.
virtual void Cancel() = 0;
« no previous file with comments | « no previous file | chrome/browser/chooser_controller/chooser_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698