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

Unified Diff: chrome/browser/ui/views/frame/browser_view_layout.cc

Issue 22903022: Limit constrained windows to the size of the parent view. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added GetMaximumDialogSize Created 7 years, 4 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/frame/browser_view_layout.cc
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc
index 571a098fc373bb06f7d9f9d95f4f2ba85f88c1ed..bf74f4020304ea2c0cabdab211cb3a637950c637 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -99,6 +99,10 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
return gfx::Point(middle_x - size.width() / 2, top_y);
}
+ virtual gfx::Size GetMaximumDialogSize() OVERRIDE {
+ return browser_view_layout_->browser_view_->GetClientAreaBounds().size();
+ }
+
// Add/remove observer.
virtual void AddObserver(
WebContentsModalDialogHostObserver* observer) OVERRIDE {

Powered by Google App Engine
This is Rietveld 408576698