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

Side by Side Diff: ui/views/widget/window_visibility_animation_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: Created 6 years, 1 month 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/views/widget/window_visibility_animation_aura.h"
6
7 #include "ui/wm/core/window_animations.h"
8
9 namespace views {
10
11 WindowVisibilityAnimationAura::WindowVisibilityAnimationAura(
12 aura::Window* window)
13 : window_(window) {
14 DCHECK(window);
15 }
16
17 WindowVisibilityAnimationAura::~WindowVisibilityAnimationAura() {
18 }
19
20 void WindowVisibilityAnimationAura::SetDuration(
21 const base::TimeDelta& duration) {
22 wm::SetWindowVisibilityAnimationDuration(window_, duration);
23 }
24
25 void WindowVisibilityAnimationAura::SetTransition(Transition transition) {
26 wm::WindowVisibilityAnimationTransition wm_transition;
27 switch (transition) {
28 case ANIMATE_SHOW:
29 wm_transition = wm::ANIMATE_SHOW;
30 case ANIMATE_HIDE:
31 wm_transition = wm::ANIMATE_HIDE;
32 case ANIMATE_BOTH:
33 wm_transition = wm::ANIMATE_BOTH;
34 case ANIMATE_NONE:
35 wm_transition = wm::ANIMATE_NONE;
36 }
37 wm::SetWindowVisibilityAnimationTransition(window_, wm_transition);
38 }
39
40 } // namespace views
OLDNEW
« ui/views/widget/widget.h ('K') | « ui/views/widget/window_visibility_animation_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698