Commit 1f113f3d authored by lliabraa's avatar lliabraa Committed by Commit bot

Add a callback for cancelling the context menu.

The callback updates the |visible| property to NO so clients can
correctly determine if the context menu has been dismissed.

BUG=489121

Review URL: https://codereview.chromium.org/1144873002

Cr-Commit-Position: refs/heads/master@{#330562}
parent 601f2ef1
......@@ -268,10 +268,13 @@ CGFloat GetScreenHeight() {
}];
// Cancel button goes last, to match other browsers.
void (^cancelHandler)(UIAlertAction*) = ^(UIAlertAction* action) {
[weakSelf setVisible:NO];
};
UIAlertAction* cancel_action =
[UIAlertAction actionWithTitle:l10n_util::GetNSString(IDS_APP_CANCEL)
style:UIAlertActionStyleCancel
handler:nil];
handler:cancelHandler];
[alert addAction:cancel_action];
// Present sheet/popover using controller that is added to view hierarchy.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment