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

Unified Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view.cc

Issue 12212195: Re-land "view permission" feature (r179916) with Mac Fix. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac Fix Integrated Created 7 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/extensions/extension_install_dialog_view.cc
diff --git a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc
index 877b0e3a8f43cf4b6a0a4696802e86edb3686059..f9aa70d6a4ed2038d0619b24d9870be2a0c7c853 100644
--- a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc
@@ -95,6 +95,7 @@ class ExtensionInstallDialogView : public views::DialogDelegateView,
private:
// views::DialogDelegateView:
+ virtual int GetDialogButtons() const OVERRIDE;
virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE;
virtual int GetDefaultDialogButton() const OVERRIDE;
virtual bool Cancel() OVERRIDE;
@@ -443,6 +444,14 @@ void ExtensionInstallDialogView::SizeToContents() {
GetWidget()->SetSize(GetWidget()->non_client_view()->GetPreferredSize());
}
+int ExtensionInstallDialogView::GetDialogButtons() const {
+ int buttons = prompt_.GetDialogButtons();
+ // Simply having just an OK button is *not* supported. See comment on function
+ // GetDialogButtons in dialog_delegate.h for reasons.
+ DCHECK_GT(buttons & ui::DIALOG_BUTTON_CANCEL, 0);
+ return buttons;
+}
+
string16 ExtensionInstallDialogView::GetDialogButtonLabel(
ui::DialogButton button) const {
switch (button) {

Powered by Google App Engine
This is Rietveld 408576698