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

Unified Diff: chrome/browser/ui/permission_bubble/permission_prompt.h

Issue 2868783002: Move requests from Show() argument to PermissionPrompt::Delegate (Closed)
Patch Set: rm vector on android Created 3 years, 7 months 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
Index: chrome/browser/ui/permission_bubble/permission_prompt.h
diff --git a/chrome/browser/ui/permission_bubble/permission_prompt.h b/chrome/browser/ui/permission_bubble/permission_prompt.h
index 7f6f770282feaa1cccce7699171fb0db611aa032..3b0f8683b0f723c9c889713d62f5c5f1eccd7254 100644
--- a/chrome/browser/ui/permission_bubble/permission_prompt.h
+++ b/chrome/browser/ui/permission_bubble/permission_prompt.h
@@ -29,6 +29,9 @@ class PermissionPrompt {
public:
virtual ~Delegate() {}
+ virtual const std::vector<PermissionRequest*>& Requests() = 0;
raymes 2017/05/11 01:17:55 We may want to add a comment that the objects in t
Timothy Loh 2017/05/11 04:42:08 Added a comment.
+ virtual const std::vector<bool>& AcceptStates() = 0;
+
virtual void ToggleAccept(int index, bool new_value) = 0;
virtual void TogglePersist(bool new_value) = 0;
virtual void Accept() = 0;
@@ -48,14 +51,9 @@ class PermissionPrompt {
// Sets the delegate which will receive UI events forwarded from the prompt.
virtual void SetDelegate(Delegate* delegate) = 0;
- // Causes the request UI to show up with the given contents. This method may
- // be called with mostly-identical contents to the existing contents. This can
- // happen, for instance, if a new permission is requested and
- // CanAcceptRequestUpdate() is true.
- // Important: the view must not store any of the request objects it receives
- // in this call.
- virtual void Show(const std::vector<PermissionRequest*>& requests,
- const std::vector<bool>& accept_state) = 0;
+ // Show a prompt with the requests from the delegate. This will only be called
+ // if there is no prompt showing.
+ virtual void Show() = 0;
// Returns true if the view can accept a new Show() command to coalesce
// requests. Currently the policy is that this should return true if the view

Powered by Google App Engine
This is Rietveld 408576698