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

Side by Side Diff: ui/views/corewm/window_animations.cc

Issue 130983007: Creating multi profile animations for switching users and teleporting of windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed windows build & addressed Created 6 years, 10 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 | Annotate | Revision Log
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 "ui/views/corewm/window_animations.h" 5 #include "ui/views/corewm/window_animations.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 kWindowVisibilityAnimationTransitionKey); 521 kWindowVisibilityAnimationTransitionKey);
522 return (prop & transition) != 0; 522 return (prop & transition) != 0;
523 } 523 }
524 524
525 void SetWindowVisibilityAnimationDuration(aura::Window* window, 525 void SetWindowVisibilityAnimationDuration(aura::Window* window,
526 const TimeDelta& duration) { 526 const TimeDelta& duration) {
527 window->SetProperty(kWindowVisibilityAnimationDurationKey, 527 window->SetProperty(kWindowVisibilityAnimationDurationKey,
528 static_cast<int>(duration.ToInternalValue())); 528 static_cast<int>(duration.ToInternalValue()));
529 } 529 }
530 530
531 base::TimeDelta GetWindowVisibilityAnimationDuration(aura::Window* window) {
532 return base::TimeDelta::FromInternalValue(
533 window->GetProperty(kWindowVisibilityAnimationDurationKey));
534 }
535
531 void SetWindowVisibilityAnimationVerticalPosition(aura::Window* window, 536 void SetWindowVisibilityAnimationVerticalPosition(aura::Window* window,
532 float position) { 537 float position) {
533 window->SetProperty(kWindowVisibilityAnimationVerticalPositionKey, position); 538 window->SetProperty(kWindowVisibilityAnimationVerticalPositionKey, position);
534 } 539 }
535 540
536 ui::ImplicitAnimationObserver* CreateHidingWindowAnimationObserver( 541 ui::ImplicitAnimationObserver* CreateHidingWindowAnimationObserver(
537 aura::Window* window) { 542 aura::Window* window) {
538 return new HidingWindowAnimationObserver(window); 543 return new HidingWindowAnimationObserver(window);
539 } 544 }
540 545
(...skipping 20 matching lines...) Expand all
561 566
562 bool WindowAnimationsDisabled(aura::Window* window) { 567 bool WindowAnimationsDisabled(aura::Window* window) {
563 return (window && 568 return (window &&
564 window->GetProperty(aura::client::kAnimationsDisabledKey)) || 569 window->GetProperty(aura::client::kAnimationsDisabledKey)) ||
565 CommandLine::ForCurrentProcess()->HasSwitch( 570 CommandLine::ForCurrentProcess()->HasSwitch(
566 switches::kWindowAnimationsDisabled); 571 switches::kWindowAnimationsDisabled);
567 } 572 }
568 573
569 } // namespace corewm 574 } // namespace corewm
570 } // namespace views 575 } // namespace views
OLDNEW
« ui/views/corewm/window_animations.h ('K') | « ui/views/corewm/window_animations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698