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

Unified Diff: chrome/browser/extensions/extension_host.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: Addressed comments 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/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index d7cd52829ab2171c9ea3e3db3d92d946e0fbc095..bd491231a84389f7d8a07f77ac28aabbb3070819 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -307,6 +307,12 @@ gfx::Point ExtensionHost::GetDialogPosition(const gfx::Size& size) {
std::max(0, (bounds.height() - size.height()) / 2));
}
+gfx::Size ExtensionHost::GetMaximumDialogSize() {
+ if (!GetVisibleWebContents())
+ return gfx::Size();
+ return GetVisibleWebContents()->GetView()->GetViewBounds().size();
+}
+
void ExtensionHost::AddObserver(
web_modal::WebContentsModalDialogHostObserver* observer) {
}

Powered by Google App Engine
This is Rietveld 408576698