Commit 213efaeb authored by Melissa Zhang's avatar Melissa Zhang Committed by Commit Bot

[Sharesheet] Close sharesheet after driveshare.

Bug: 1151774
Change-Id: Ia985922e0368d96e70e25138fb9cd36390da5d56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2554199Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Commit-Queue: Melissa Zhang <melzhang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830103}
parent 8dcc2e82
...@@ -35,12 +35,14 @@ void DriveShareAction::LaunchAction( ...@@ -35,12 +35,14 @@ void DriveShareAction::LaunchAction(
sharesheet::SharesheetController* controller, sharesheet::SharesheetController* controller,
views::View* root_view, views::View* root_view,
apps::mojom::IntentPtr intent) { apps::mojom::IntentPtr intent) {
controller_ = controller;
DCHECK(intent->drive_share_url.has_value()); DCHECK(intent->drive_share_url.has_value());
NavigateParams params(controller->GetProfile(), NavigateParams params(controller_->GetProfile(),
intent->drive_share_url.value(), intent->drive_share_url.value(),
ui::PAGE_TRANSITION_LINK); ui::PAGE_TRANSITION_LINK);
params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
Navigate(&params); Navigate(&params);
controller_->CloseSharesheet();
} }
void DriveShareAction::OnClosing(sharesheet::SharesheetController* controller) { void DriveShareAction::OnClosing(sharesheet::SharesheetController* controller) {
......
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