| Index: chrome/browser/ui/gtk/constrained_window_gtk.h
|
| diff --git a/chrome/browser/ui/gtk/constrained_window_gtk.h b/chrome/browser/ui/gtk/constrained_window_gtk.h
|
| index 3e0450d5e6bf3363ff57900b2e00d3f49418de4a..108f43d6e918d31ec4723dc0731d51a09a5e4f99 100644
|
| --- a/chrome/browser/ui/gtk/constrained_window_gtk.h
|
| +++ b/chrome/browser/ui/gtk/constrained_window_gtk.h
|
| @@ -10,7 +10,7 @@
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/weak_ptr.h"
|
| -#include "chrome/browser/ui/constrained_window.h"
|
| +#include "chrome/browser/ui/web_contents_modal_dialog.h"
|
| #include "ui/base/gtk/gtk_signal.h"
|
| #include "ui/base/gtk/owned_widget_gtk.h"
|
|
|
| @@ -26,7 +26,8 @@ class ConstrainedWindowGtkDelegate {
|
| // Returns the widget that will be put in the constrained window's container.
|
| virtual GtkWidget* GetWidgetRoot() = 0;
|
|
|
| - // Returns the widget that should get focus when ConstrainedWindow is focused.
|
| + // Returns the widget that should get focus when WebContentsModalDialog is
|
| + // focused.
|
| virtual GtkWidget* GetFocusWidget() = 0;
|
|
|
| // Tells the delegate to either delete itself or set up a task to delete
|
| @@ -42,10 +43,10 @@ class ConstrainedWindowGtkDelegate {
|
| virtual ~ConstrainedWindowGtkDelegate();
|
| };
|
|
|
| -// Constrained window implementation for the GTK port. Unlike the Win32 system,
|
| -// ConstrainedWindowGtk doesn't draw draggable fake windows and instead just
|
| -// centers the dialog. It is thus an order of magnitude simpler.
|
| -class ConstrainedWindowGtk : public ConstrainedWindow {
|
| +// WebContentsModalDialog implementation for the GTK port. Unlike the Win32
|
| +// system, ConstrainedWindowGtk doesn't draw draggable fake windows and instead
|
| +// just centers the dialog. It is thus an order of magnitude simpler.
|
| +class ConstrainedWindowGtk : public WebContentsModalDialog {
|
| public:
|
| typedef ChromeWebContentsViewDelegateGtk TabContentsViewType;
|
|
|
| @@ -53,10 +54,10 @@ class ConstrainedWindowGtk : public ConstrainedWindow {
|
| ConstrainedWindowGtkDelegate* delegate);
|
| virtual ~ConstrainedWindowGtk();
|
|
|
| - // Overridden from ConstrainedWindow:
|
| - virtual void ShowConstrainedWindow() OVERRIDE;
|
| - virtual void CloseConstrainedWindow() OVERRIDE;
|
| - virtual void FocusConstrainedWindow() OVERRIDE;
|
| + // Overridden from WebContentsModalDialog:
|
| + virtual void ShowWebContentsModalDialog() OVERRIDE;
|
| + virtual void CloseWebContentsModalDialog() OVERRIDE;
|
| + virtual void FocusWebContentsModalDialog() OVERRIDE;
|
|
|
| // Called when the result of GetBackgroundColor may have changed.
|
| void BackgroundColorChanged();
|
| @@ -71,7 +72,7 @@ class ConstrainedWindowGtk : public ConstrainedWindow {
|
| TabContentsViewType* ContainingView();
|
|
|
| private:
|
| - friend class ConstrainedWindow;
|
| + friend class WebContentsModalDialog;
|
|
|
| // Signal callbacks.
|
| CHROMEGTK_CALLBACK_1(ConstrainedWindowGtk, gboolean, OnKeyPress,
|
| @@ -79,7 +80,7 @@ class ConstrainedWindowGtk : public ConstrainedWindow {
|
| CHROMEGTK_CALLBACK_1(ConstrainedWindowGtk, void, OnHierarchyChanged,
|
| GtkWidget*);
|
|
|
| - // The WebContents that owns and constrains this ConstrainedWindow.
|
| + // The WebContents that owns and constrains this WebContentsModalDialog.
|
| content::WebContents* web_contents_;
|
|
|
| // The top level widget container that exports to our WebContentsView.
|
| @@ -88,7 +89,7 @@ class ConstrainedWindowGtk : public ConstrainedWindow {
|
| // Delegate that provides the contents of this constrained window.
|
| ConstrainedWindowGtkDelegate* delegate_;
|
|
|
| - // Stores if |ShowConstrainedWindow()| has been called.
|
| + // Stores if |ShowWebContentsModalDialog()| has been called.
|
| bool visible_;
|
|
|
| base::WeakPtrFactory<ConstrainedWindowGtk> weak_factory_;
|
|
|