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

Side by Side Diff: chrome/browser/ui/views/native_web_contents_modal_dialog_manager_views.cc

Issue 2172363002: Created min size for print preview dialog and modified to allow the Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to CrOS only. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/native_web_contents_modal_dialog_manager_views .h" 5 #include "chrome/browser/ui/views/native_web_contents_modal_dialog_manager_views .h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "chrome/browser/platform_util.h" 9 #include "chrome/browser/platform_util.h"
10 #include "components/constrained_window/constrained_window_views.h" 10 #include "components/constrained_window/constrained_window_views.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 gfx::NativeView parent = platform_util::GetParent(widget->GetNativeView()); 70 gfx::NativeView parent = platform_util::GetParent(widget->GetNativeView());
71 wm::SetChildWindowVisibilityChangesAnimated(parent); 71 wm::SetChildWindowVisibilityChangesAnimated(parent);
72 // No animations should get performed on the window since that will re-order 72 // No animations should get performed on the window since that will re-order
73 // the window stack which will then cause many problems. 73 // the window stack which will then cause many problems.
74 if (parent && parent->parent()) { 74 if (parent && parent->parent()) {
75 parent->parent()->SetProperty(aura::client::kAnimationsDisabledKey, true); 75 parent->parent()->SetProperty(aura::client::kAnimationsDisabledKey, true);
76 } 76 }
77 77
78 wm::SetModalParent(widget->GetNativeWindow(), 78 wm::SetModalParent(widget->GetNativeWindow(),
79 native_delegate_->GetWebContents()->GetNativeView()); 79 native_delegate_->GetWebContents()->GetNativeView());
80
81 if (native_delegate_->IsNonClipped(dialog())) {
Mike Wittman 2016/08/12 22:51:34 We should only enable this code on the platforms w
rbpotter 2016/08/15 18:03:45 Done.
82 widget->SetNativeWindowProperty(wm::kHasIndependentBoundsKey,
83 new bool(true));
Mike Wittman 2016/08/12 22:51:34 For ease of use and to avoid leaking memory, I wou
rbpotter 2016/08/15 18:03:45 Done.
84 }
80 #endif 85 #endif
81 } 86 }
82 87
83 // SingleWebContentsDialogManager: 88 // SingleWebContentsDialogManager:
84 89
85 void NativeWebContentsModalDialogManagerViews::Show() { 90 void NativeWebContentsModalDialogManagerViews::Show() {
86 // The host destroying means the dialogs will be destroyed in short order. 91 // The host destroying means the dialogs will be destroyed in short order.
87 // Avoid showing dialogs at this point as the necessary native window 92 // Avoid showing dialogs at this point as the necessary native window
88 // services may not be present. 93 // services may not be present.
89 if (host_destroying_) 94 if (host_destroying_)
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 widget->RemoveObserver(this); 216 widget->RemoveObserver(this);
212 observed_widgets_.erase(widget); 217 observed_widgets_.erase(widget);
213 218
214 #if defined(USE_AURA) 219 #if defined(USE_AURA)
215 shown_widgets_.erase(widget); 220 shown_widgets_.erase(widget);
216 #endif 221 #endif
217 222
218 // Will cause this object to be deleted. 223 // Will cause this object to be deleted.
219 native_delegate_->WillClose(widget->GetNativeWindow()); 224 native_delegate_->WillClose(widget->GetNativeWindow());
220 } 225 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698