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

Unified Diff: chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc

Issue 10388252: Refactoring ExtenionInstallUI to abstract the Browser references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced + mac fix Created 8 years, 6 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/gtk/extensions/extension_install_dialog_gtk.cc
diff --git a/chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc
index 49caddb41ce10a8c882f98592b6255d0d74272d3..3df8f3a8b7ea61325dec3769fa5e210566ce5ac0 100644
--- a/chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc
@@ -53,35 +53,35 @@ void AddResourceIcon(const gfx::ImageSkia* icon, void* data) {
namespace browser {
// Displays the dialog when constructed, deletes itself when dialog is
-// dismissed. Success/failure is passed back through the ExtensionInstallUI::
-// Delegate instance.
+// dismissed. Success/failure is passed back through the
+// ExtensionInstallPrompt::Delegate instance.
class ExtensionInstallDialog {
public:
ExtensionInstallDialog(GtkWindow* parent,
- ExtensionInstallUI::Delegate *delegate,
- const ExtensionInstallUI::Prompt& prompt);
+ ExtensionInstallPrompt::Delegate *delegate,
+ const ExtensionInstallPrompt::Prompt& prompt);
private:
~ExtensionInstallDialog();
CHROMEGTK_CALLBACK_1(ExtensionInstallDialog, void, OnResponse, int);
CHROMEGTK_CALLBACK_0(ExtensionInstallDialog, void, OnStoreLinkClick);
- ExtensionInstallUI::Delegate* delegate_;
+ ExtensionInstallPrompt::Delegate* delegate_;
std::string extension_id_; // Set for INLINE_INSTALL_PROMPT.
GtkWidget* dialog_;
};
ExtensionInstallDialog::ExtensionInstallDialog(
GtkWindow* parent,
- ExtensionInstallUI::Delegate *delegate,
- const ExtensionInstallUI::Prompt& prompt)
+ ExtensionInstallPrompt::Delegate *delegate,
+ const ExtensionInstallPrompt::Prompt& prompt)
: delegate_(delegate),
dialog_(NULL) {
bool show_permissions = prompt.GetPermissionCount() > 0;
bool is_inline_install =
- prompt.type() == ExtensionInstallUI::INLINE_INSTALL_PROMPT;
+ prompt.type() == ExtensionInstallPrompt::INLINE_INSTALL_PROMPT;
bool is_bundle_install =
- prompt.type() == ExtensionInstallUI::BUNDLE_INSTALL_PROMPT;
+ prompt.type() == ExtensionInstallPrompt::BUNDLE_INSTALL_PROMPT;
if (is_inline_install)
extension_id_ = prompt.extension()->id();
@@ -268,8 +268,8 @@ void ExtensionInstallDialog::OnStoreLinkClick(GtkWidget* sender) {
void ShowExtensionInstallDialogImpl(
Profile* profile,
- ExtensionInstallUI::Delegate* delegate,
- const ExtensionInstallUI::Prompt& prompt) {
+ ExtensionInstallPrompt::Delegate* delegate,
+ const ExtensionInstallPrompt::Prompt& prompt) {
Browser* browser = browser::FindLastActiveWithProfile(profile);
if (!browser) {
delegate->InstallUIAbort(false);

Powered by Google App Engine
This is Rietveld 408576698