| Index: chrome/browser/ui/views/constrained_window_views.h
|
| diff --git a/chrome/browser/ui/views/constrained_window_views.h b/chrome/browser/ui/views/constrained_window_views.h
|
| index 3a5afddcc40d7446c3886a97a3cb298f352a6c6b..fef4ab345a754bf2637478b68b260bdba8023c94 100644
|
| --- a/chrome/browser/ui/views/constrained_window_views.h
|
| +++ b/chrome/browser/ui/views/constrained_window_views.h
|
| @@ -23,31 +23,6 @@ class NonClientFrameView;
|
| class WidgetDelegate;
|
| }
|
|
|
| -class NativeConstrainedWindowDelegate {
|
| - public:
|
| - virtual ~NativeConstrainedWindowDelegate() {}
|
| -
|
| - // Called after the NativeConstrainedWindow has been destroyed and is about to
|
| - // be deleted.
|
| - virtual void OnNativeConstrainedWindowDestroyed() = 0;
|
| -
|
| - // Called when the NativeConstrainedWindow is clicked on when inactive.
|
| - virtual void OnNativeConstrainedWindowMouseActivate() = 0;
|
| -
|
| - virtual views::internal::NativeWidgetDelegate* AsNativeWidgetDelegate() = 0;
|
| -};
|
| -
|
| -class NativeConstrainedWindow {
|
| - public:
|
| - virtual ~NativeConstrainedWindow() {}
|
| -
|
| - // Creates a platform-specific implementation of NativeConstrainedWindow.
|
| - static NativeConstrainedWindow* CreateNativeConstrainedWindow(
|
| - NativeConstrainedWindowDelegate* delegate);
|
| -
|
| - virtual views::NativeWidget* AsNativeWidget() = 0;
|
| -};
|
| -
|
| ///////////////////////////////////////////////////////////////////////////////
|
| // ConstrainedWindowViews
|
| //
|
| @@ -56,16 +31,13 @@ class NativeConstrainedWindow {
|
| // itself and will be deleted soon after being closed.
|
| //
|
| class ConstrainedWindowViews : public views::Widget,
|
| - public WebContentsModalDialog,
|
| - public NativeConstrainedWindowDelegate {
|
| + public WebContentsModalDialog {
|
| public:
|
| - ConstrainedWindowViews(content::WebContents* web_contents,
|
| + ConstrainedWindowViews(gfx::NativeView parent,
|
| + bool off_the_record,
|
| views::WidgetDelegate* widget_delegate);
|
| virtual ~ConstrainedWindowViews();
|
|
|
| - // Returns the WebContents that constrains this Constrained Window.
|
| - content::WebContents* owner() const { return web_contents_; }
|
| -
|
| // Overridden from WebContentsModalDialog:
|
| virtual void ShowWebContentsModalDialog() OVERRIDE;
|
| virtual void CloseWebContentsModalDialog() OVERRIDE;
|
| @@ -73,23 +45,15 @@ class ConstrainedWindowViews : public views::Widget,
|
| virtual void PulseWebContentsModalDialog() OVERRIDE;
|
| virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
|
|
|
| - // Default insets for the dialog:
|
| - static gfx::Insets GetDefaultInsets();
|
| + // Factory function for the class (temporary).
|
| + static ConstrainedWindowViews* Create(content::WebContents* web_contents,
|
| + views::WidgetDelegate* widget_delegate);
|
|
|
| private:
|
| // Overridden from views::Widget:
|
| virtual views::NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
|
|
|
| - // Overridden from NativeConstrainedWindowDelegate:
|
| - virtual void OnNativeConstrainedWindowDestroyed() OVERRIDE;
|
| - virtual void OnNativeConstrainedWindowMouseActivate() OVERRIDE;
|
| - virtual views::internal::NativeWidgetDelegate*
|
| - AsNativeWidgetDelegate() OVERRIDE;
|
| - virtual int GetNonClientComponent(const gfx::Point& point) OVERRIDE;
|
| -
|
| - content::WebContents* web_contents_;
|
| -
|
| - NativeConstrainedWindow* native_constrained_window_;
|
| + bool off_the_record_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowViews);
|
| };
|
|
|