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

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: Fix ifdef logic, return deps to normal 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 #if defined(OS_CHROMEOS)
81 if (native_delegate_->IsNonClipped(dialog())) {
82 widget->SetNativeWindowProperty(wm::kHasIndependentBoundsKey,
83 reinterpret_cast<void*>(true));
84 }
85 #endif // OS_CHROMEOS
80 #endif 86 #endif
81 } 87 }
82 88
83 // SingleWebContentsDialogManager: 89 // SingleWebContentsDialogManager:
84 90
85 void NativeWebContentsModalDialogManagerViews::Show() { 91 void NativeWebContentsModalDialogManagerViews::Show() {
86 // The host destroying means the dialogs will be destroyed in short order. 92 // The host destroying means the dialogs will be destroyed in short order.
87 // Avoid showing dialogs at this point as the necessary native window 93 // Avoid showing dialogs at this point as the necessary native window
88 // services may not be present. 94 // services may not be present.
89 if (host_destroying_) 95 if (host_destroying_)
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 widget->RemoveObserver(this); 217 widget->RemoveObserver(this);
212 observed_widgets_.erase(widget); 218 observed_widgets_.erase(widget);
213 219
214 #if defined(USE_AURA) 220 #if defined(USE_AURA)
215 shown_widgets_.erase(widget); 221 shown_widgets_.erase(widget);
216 #endif 222 #endif
217 223
218 // Will cause this object to be deleted. 224 // Will cause this object to be deleted.
219 native_delegate_->WillClose(widget->GetNativeWindow()); 225 native_delegate_->WillClose(widget->GetNativeWindow());
220 } 226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698