Commit ded05d06 authored by msw@chromium.org's avatar msw@chromium.org

Fix the print preview dialog frame.

My r275303 mistakenly removed a function override.
(it was a reasonable change for an earlier patch set)

Restore ConstrainedWebDialogDelegateViewViews code.
(uses dialog frame views via CreateNonClientFrameView)

BUG=381524
TEST=Print preview dialog frame is back to normal.
TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/317243004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275559 0039d316-1c4b-4281-b951-d872f2087c98
parent 8f6f22d9
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h" #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
#include "ui/views/controls/webview/webview.h" #include "ui/views/controls/webview/webview.h"
#include "ui/views/widget/widget.h" #include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h" #include "ui/views/window/dialog_delegate.h"
#include "ui/web_dialogs/web_dialog_delegate.h" #include "ui/web_dialogs/web_dialog_delegate.h"
#include "ui/web_dialogs/web_dialog_ui.h" #include "ui/web_dialogs/web_dialog_ui.h"
...@@ -117,6 +117,10 @@ class ConstrainedWebDialogDelegateViewViews ...@@ -117,6 +117,10 @@ class ConstrainedWebDialogDelegateViewViews
virtual views::View* GetContentsView() OVERRIDE { virtual views::View* GetContentsView() OVERRIDE {
return this; return this;
} }
virtual views::NonClientFrameView* CreateNonClientFrameView(
views::Widget* widget) OVERRIDE {
return views::DialogDelegate::CreateDialogFrameView(widget);
}
virtual bool ShouldShowCloseButton() const OVERRIDE { virtual bool ShouldShowCloseButton() const OVERRIDE {
// No close button if the dialog doesn't want a title bar. // No close button if the dialog doesn't want a title bar.
return impl_->GetWebDialogDelegate()->ShouldShowDialogTitle(); return impl_->GetWebDialogDelegate()->ShouldShowDialogTitle();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment