| OLD | NEW |
| 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 Loading... |
| 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 | |
| 95 views::corewm::SetModalParent( | 94 views::corewm::SetModalParent( |
| 96 widget->GetNativeWindow(), | 95 widget->GetNativeWindow(), |
| 97 platform_util::GetParent(widget->GetNativeView())); | 96 platform_util::GetParent(widget->GetNativeView())); |
| 98 #endif | 97 #endif |
| 99 } | 98 } |
| 100 | 99 |
| 101 virtual void ShowDialog(NativeWebContentsModalDialog dialog) OVERRIDE { | 100 virtual void ShowDialog(NativeWebContentsModalDialog dialog) OVERRIDE { |
| 102 views::Widget* widget = GetWidget(dialog); | 101 views::Widget* widget = GetWidget(dialog); |
| 103 #if defined(USE_AURA) | 102 #if defined(USE_AURA) |
| 104 scoped_ptr<views::corewm::SuspendChildWindowVisibilityAnimations> suspend; | 103 scoped_ptr<views::corewm::SuspendChildWindowVisibilityAnimations> suspend; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 239 |
| 241 namespace web_modal { | 240 namespace web_modal { |
| 242 | 241 |
| 243 NativeWebContentsModalDialogManager* WebContentsModalDialogManager:: | 242 NativeWebContentsModalDialogManager* WebContentsModalDialogManager:: |
| 244 CreateNativeManager( | 243 CreateNativeManager( |
| 245 NativeWebContentsModalDialogManagerDelegate* native_delegate) { | 244 NativeWebContentsModalDialogManagerDelegate* native_delegate) { |
| 246 return new NativeWebContentsModalDialogManagerViews(native_delegate); | 245 return new NativeWebContentsModalDialogManagerViews(native_delegate); |
| 247 } | 246 } |
| 248 | 247 |
| 249 } // namespace web_modal | 248 } // namespace web_modal |
| OLD | NEW |