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

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

Issue 97893002: aura/ash cleanup: Use a single window-key for constrained windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/solo_window_tracker_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <set> 5 #include <set>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/platform_util.h" 8 #include "chrome/browser/platform_util.h"
9 #include "chrome/browser/ui/views/constrained_window_views.h" 9 #include "chrome/browser/ui/views/constrained_window_views.h"
10 #include "components/web_modal/native_web_contents_modal_dialog_manager.h" 10 #include "components/web_modal/native_web_contents_modal_dialog_manager.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 #if defined(USE_ASH) 85 #if defined(USE_ASH)
86 gfx::NativeView parent = platform_util::GetParent(widget->GetNativeView()); 86 gfx::NativeView parent = platform_util::GetParent(widget->GetNativeView());
87 views::corewm::SetChildWindowVisibilityChangesAnimated(parent); 87 views::corewm::SetChildWindowVisibilityChangesAnimated(parent);
88 // No animations should get performed on the window since that will re-order 88 // No animations should get performed on the window since that will re-order
89 // the window stack which will then cause many problems. 89 // the window stack which will then cause many problems.
90 if (parent && parent->parent()) { 90 if (parent && parent->parent()) {
91 parent->parent()->SetProperty(aura::client::kAnimationsDisabledKey, true); 91 parent->parent()->SetProperty(aura::client::kAnimationsDisabledKey, true);
92 } 92 }
93 93
94 // TODO(wittman): remove once the new visual style is complete 94 // TODO(wittman): remove once the new visual style is complete
sky 2013/12/02 21:41:46 Is the TODO still appropriate?
sadrul 2013/12/02 22:05:21 Whoops. I missed this before landing, sorry. Check
95 widget->GetNativeWindow()->SetProperty(ash::kConstrainedWindowKey, true);
96 views::corewm::SetModalParent( 95 views::corewm::SetModalParent(
97 widget->GetNativeWindow(), 96 widget->GetNativeWindow(),
98 platform_util::GetParent(widget->GetNativeView())); 97 platform_util::GetParent(widget->GetNativeView()));
99 #endif 98 #endif
100 } 99 }
101 100
102 virtual void ShowDialog(NativeWebContentsModalDialog dialog) OVERRIDE { 101 virtual void ShowDialog(NativeWebContentsModalDialog dialog) OVERRIDE {
103 views::Widget* widget = GetWidget(dialog); 102 views::Widget* widget = GetWidget(dialog);
104 #if defined(USE_AURA) 103 #if defined(USE_AURA)
105 scoped_ptr<views::corewm::SuspendChildWindowVisibilityAnimations> suspend; 104 scoped_ptr<views::corewm::SuspendChildWindowVisibilityAnimations> suspend;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 240
242 namespace web_modal { 241 namespace web_modal {
243 242
244 NativeWebContentsModalDialogManager* WebContentsModalDialogManager:: 243 NativeWebContentsModalDialogManager* WebContentsModalDialogManager::
245 CreateNativeManager( 244 CreateNativeManager(
246 NativeWebContentsModalDialogManagerDelegate* native_delegate) { 245 NativeWebContentsModalDialogManagerDelegate* native_delegate) {
247 return new NativeWebContentsModalDialogManagerViews(native_delegate); 246 return new NativeWebContentsModalDialogManagerViews(native_delegate);
248 } 247 }
249 248
250 } // namespace web_modal 249 } // namespace web_modal
OLDNEW
« no previous file with comments | « ash/wm/solo_window_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698