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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 693523003: MacViews: Put wm window animation calls behind an interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views-clipboard
Patch Set: Fix windows build Created 6 years, 2 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
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/views/widget/native_widget_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index ea164fb52acf2eb0f8883fb5addccf842bf2891d..b5b5394ded4c6afd2489ee83fd594e021536d0de 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -37,6 +37,7 @@
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/widget/window_reorderer.h"
#include "ui/wm/core/shadow_types.h"
+#include "ui/wm/core/window_animations.h"
#include "ui/wm/core/window_util.h"
#include "ui/wm/public/activation_client.h"
#include "ui/wm/public/drag_drop_client.h"
@@ -678,6 +679,31 @@ void NativeWidgetAura::SetVisibilityChangedAnimationsEnabled(bool value) {
window_->SetProperty(aura::client::kAnimationsDisabledKey, !value);
}
+void NativeWidgetAura::SetVisibilityAnimationDuration(
+ const base::TimeDelta& duration) {
+ wm::SetWindowVisibilityAnimationDuration(window_, duration);
+}
+
+void NativeWidgetAura::SetVisibilityAnimationTransition(
+ Widget::VisibilityTransition transition) {
+ wm::WindowVisibilityAnimationTransition wm_transition = wm::ANIMATE_NONE;
+ switch (transition) {
+ case Widget::ANIMATE_SHOW:
+ wm_transition = wm::ANIMATE_SHOW;
+ break;
+ case Widget::ANIMATE_HIDE:
+ wm_transition = wm::ANIMATE_HIDE;
+ break;
+ case Widget::ANIMATE_BOTH:
+ wm_transition = wm::ANIMATE_BOTH;
+ break;
+ case Widget::ANIMATE_NONE:
+ wm_transition = wm::ANIMATE_NONE;
+ break;
+ }
+ wm::SetWindowVisibilityAnimationTransition(window_, wm_transition);
+}
+
ui::NativeTheme* NativeWidgetAura::GetNativeTheme() const {
#if !defined(OS_CHROMEOS)
return DesktopWindowTreeHost::GetNativeTheme(window_);
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/views/widget/native_widget_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698