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

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: No initializer Created 7 years, 3 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
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/printing/print_preview_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index bd439288bb516a74e933d5a50b9d3a7bd87ca7eb..286be86e176498b109d8444058ed9ce007a2c28d 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -311,6 +311,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) {
}
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/printing/print_preview_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698