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 3b0f8683b0f723c9c889713d62f5c5f1eccd7254..607fe9ab34ab89ad165cc5e13606b1b38001c95c 100644 |
--- a/chrome/browser/ui/permission_bubble/permission_prompt.h |
+++ b/chrome/browser/ui/permission_bubble/permission_prompt.h |
@@ -55,10 +55,13 @@ class PermissionPrompt { |
// 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 |
- // is being shown and the mouse is not over the view area (!IsMouseHovered). |
- virtual bool CanAcceptRequestUpdate() = 0; |
+ // Try to cancel (i.e. hide and don't run callbacks) the current request and |
+ // return whether it was cancelled. Currently the policy is that this should |
+ // fail if the view is being shown and the mouse is not over the view area |
+ // (!IsMouseHovered). This invalidates request objects from the last Show() |
+ // call, so if the cancel failed, Show() will be called with the cancelled |
+ // requests replaced with dummy PermissionRequest objects. |
+ virtual bool MaybeCancelRequest() = 0; |
// Returns true if the prompt UI will manage hiding itself when the user |
// resolves the prompt, on page navigation/destruction, and on tab switching. |