Commit fdfc998a authored by Marina Ciocea's avatar Marina Ciocea Committed by Commit Bot

Make Stop the primary button on tab sharing infobar.

Change confirm button to Stop instead of Share, because "stop" should be the
default action for the infobar.

Bug: 927949
Change-Id: I9cbcfe6ab2ccd6e365148c250019259dd72e6762
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645299
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668506}
parent 72c56b32
......@@ -55,21 +55,21 @@ base::string16 TabSharingInfoBarDelegate::GetMessageText() const {
base::string16 TabSharingInfoBarDelegate::GetButtonLabel(
InfoBarButton button) const {
return l10n_util::GetStringUTF16((button == BUTTON_OK)
? IDS_TAB_SHARING_INFOBAR_SHARE_BUTTON
: IDS_TAB_SHARING_INFOBAR_STOP_BUTTON);
? IDS_TAB_SHARING_INFOBAR_STOP_BUTTON
: IDS_TAB_SHARING_INFOBAR_SHARE_BUTTON);
}
int TabSharingInfoBarDelegate::GetButtons() const {
return shared_tab_name_.empty() ? BUTTON_CANCEL : BUTTON_OK | BUTTON_CANCEL;
return shared_tab_name_.empty() ? BUTTON_OK : BUTTON_OK | BUTTON_CANCEL;
}
bool TabSharingInfoBarDelegate::Accept() {
ui_->StartSharing(infobar());
ui_->StopSharing();
return false;
}
bool TabSharingInfoBarDelegate::Cancel() {
ui_->StopSharing();
ui_->StartSharing(infobar());
return false;
}
......
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