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

Unified Diff: chrome/browser/ui/views/extensions/extension_dialog.h

Issue 10584026: Allow ChromeOS file selection dialog to be shown from shell windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Uses BaseWindow instead of Browser 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/views/extensions/extension_dialog.h
diff --git a/chrome/browser/ui/views/extensions/extension_dialog.h b/chrome/browser/ui/views/extensions/extension_dialog.h
index 272f27091a823a7e81f4eed390d58d88d5f99e77..cbf4815254bb401d1af06e4cf32ccbe0f7edaa28 100644
--- a/chrome/browser/ui/views/extensions/extension_dialog.h
+++ b/chrome/browser/ui/views/extensions/extension_dialog.h
@@ -12,7 +12,7 @@
#include "content/public/browser/notification_registrar.h"
#include "ui/views/widget/widget_delegate.h"
-class Browser;
+class BaseWindow;
class ExtensionDialogObserver;
class ExtensionHost;
class GURL;
@@ -23,7 +23,7 @@ class WebContents;
}
// Modal dialog containing contents provided by an extension.
-// Dialog is automatically centered in the browser window and has fixed size.
+// Dialog is automatically centered in the owning window and has fixed size.
// For example, used by the Chrome OS file browser.
class ExtensionDialog : public views::WidgetDelegate,
public content::NotificationObserver,
@@ -31,12 +31,14 @@ class ExtensionDialog : public views::WidgetDelegate,
public:
virtual ~ExtensionDialog();
- // Create and show a dialog with |url| centered over the browser window.
- // |browser| is the browser to which the pop-up will be attached.
+ // Create and show a dialog with |url| centered over the provided window.
+ // |base_window| is the window to which the pop-up will be attached.
+ // |profile| is the profile that the extension is registered with.
// |web_contents| is the tab that spawned the dialog.
// |width| and |height| are the size of the dialog in pixels.
static ExtensionDialog* Show(const GURL& url,
- Browser* browser,
+ BaseWindow* base_window,
+ Profile* profile,
content::WebContents* web_contents,
int width,
int height,
@@ -97,7 +99,7 @@ class ExtensionDialog : public views::WidgetDelegate,
ExtensionDialog(ExtensionHost* host, ExtensionDialogObserver* observer);
static ExtensionDialog* ShowInternal(const GURL& url,
- Browser* browser,
+ BaseWindow* base_window,
ExtensionHost* host,
int width,
int height,
@@ -106,10 +108,9 @@ class ExtensionDialog : public views::WidgetDelegate,
ExtensionDialogObserver* observer);
static ExtensionHost* CreateExtensionHost(const GURL& url,
- Browser* browser,
Profile* profile);
- void InitWindow(Browser* browser, int width, int height);
+ void InitWindow(BaseWindow* base_window, int width, int height);
void InitWindowFullscreen();
// Window that holds the extension host view.

Powered by Google App Engine
This is Rietveld 408576698