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

Unified Diff: chrome/browser/ui/gtk/apps/native_app_window_gtk.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
Index: chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
diff --git a/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc b/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
index d2c5925b220ba3a5a72d97f2e364cdf5733567c0..12a3d5d8c8d110267bea7f7bcce2576feb393e69 100644
--- a/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
+++ b/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
@@ -384,6 +384,13 @@ gfx::Point NativeAppWindowGtk::GetDialogPosition(const gfx::Size& size) {
current_height / 2 - size.height() / 2);
}
+gfx::Size NativeAppWindowGtk::GetMaximumDialogSize() {
+ gint current_width = 0;
+ gint current_height = 0;
+ gtk_window_get_size(window_, &current_width, &current_height);
+ return gfx::Size(current_width, current_height);
+}
+
void NativeAppWindowGtk::AddObserver(
web_modal::WebContentsModalDialogHostObserver* observer) {
observer_list_.AddObserver(observer);
« no previous file with comments | « chrome/browser/ui/gtk/apps/native_app_window_gtk.h ('k') | chrome/browser/ui/views/apps/native_app_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698