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

Unified Diff: chrome/browser/ui/views/website_settings/permissions_bubble_view.cc

Issue 176053002: [WebsiteSettings] Change permission bubble API to adapt to new mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/views/website_settings/permissions_bubble_view.cc
diff --git a/chrome/browser/ui/views/website_settings/permissions_bubble_view.cc b/chrome/browser/ui/views/website_settings/permissions_bubble_view.cc
index 850544b61dcd24aba3330be1bb8bae9f5ff6c3a3..fc2852b9324355ab55b6e75ad2c2ba67791de31c 100644
--- a/chrome/browser/ui/views/website_settings/permissions_bubble_view.cc
+++ b/chrome/browser/ui/views/website_settings/permissions_bubble_view.cc
@@ -158,26 +158,15 @@ PermissionsBubbleDelegateView::PermissionsBubbleDelegateView(
button_layout->AddView(new views::View());
}
- // Lay out the Deny/Allow buttons. Use custom text if there is only
- // one permission request.
- base::string16 deny_text;
- base::string16 allow_text;
- if (requests.size() == 1) {
- deny_text = requests[0]->GetAlternateDenyButtonText();
- allow_text = requests[0]->GetAlternateAcceptButtonText();
- }
-
- if (deny_text.empty())
- deny_text = l10n_util::GetStringUTF16(IDS_PERMISSION_DENY);
- if (allow_text.empty())
- allow_text = l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW);
-
+ // Lay out the Deny/Allow buttons.
+ base::string16 deny_text = l10n_util::GetStringUTF16(IDS_PERMISSION_DENY);
views::LabelButton* deny_button = new views::LabelButton(this, deny_text);
deny_button->SetStyle(views::Button::STYLE_BUTTON);
deny_button->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont));
button_layout->AddView(deny_button);
deny_ = deny_button;
+ base::string16 allow_text = l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW);
views::LabelButton* allow_button = new views::LabelButton(this, allow_text);
allow_button->SetStyle(views::Button::STYLE_BUTTON);
allow_button->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont));
@@ -269,6 +258,12 @@ void PermissionBubbleViewViews::Show(
bubble_delegate->SizeToContents();
}
+bool PermissionBubbleViewViews::CanAcceptRequestUpdate() {
+ // TODO(gbillock): support this.
+ // return bubble_delegate_ && bubble_delegate_->IsMouseHovered();
+ return false;
+}
+
void PermissionBubbleViewViews::Hide() {
if (bubble_delegate_) {
bubble_delegate_->Close();

Powered by Google App Engine
This is Rietveld 408576698