summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing
diff options
context:
space:
mode:
authorrfevang@chromium.org <rfevang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-06 05:08:43 +0000
committerrfevang@chromium.org <rfevang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-06 05:08:43 +0000
commit0026387d76bcab8405a73038c5734b05f0f786fe (patch)
tree88d8c1ac8280954b7e253c1c3663e4548054920f /chrome/browser/printing
parent4e7cca2801c90284b97d4809e3861798f178dcf4 (diff)
downloadchromium_src-0026387d76bcab8405a73038c5734b05f0f786fe.zip
chromium_src-0026387d76bcab8405a73038c5734b05f0f786fe.tar.gz
chromium_src-0026387d76bcab8405a73038c5734b05f0f786fe.tar.bz2
Limit constrained windows to the size of the parent view.
Constrained windows would get drawn partially outside the browser window, obscuring some of the contents. This CL limits their size so everything is in view. This mimics the behavior of the old style dialogs. This CL also changes the size request to use the current preferred size of the view, instead of reusing the existing size. Some dialogs (like the print preview) changes their size preferences when the browser window size changes, so the old size might not be optimal any more. Additionally, added a GetMinimumSize to the bubble frame view, as previously GetPreferredSize would get used, effectively undoing the additional restrictions placed based on Window sizes. BUG=272760,274236,276150 Review URL: https://chromiumcodereview.appspot.com/22903022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221573 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing')
-rw-r--r--chrome/browser/printing/print_preview_test.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/printing/print_preview_test.cc b/chrome/browser/printing/print_preview_test.cc
index c4223a7..b6d0f23 100644
--- a/chrome/browser/printing/print_preview_test.cc
+++ b/chrome/browser/printing/print_preview_test.cc
@@ -46,6 +46,10 @@ class PrintPreviewTestBrowserWindow
return gfx::Point();
}
+ virtual gfx::Size GetMaximumDialogSize() OVERRIDE {
+ return gfx::Size();
+ }
+
virtual void AddObserver(
WebContentsModalDialogHostObserver* observer) OVERRIDE {}
virtual void RemoveObserver(