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 "ash/wm/workspace/workspace_cycler_animator.h" | 5 #include "ash/wm/workspace/workspace_cycler_animator.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "ash/launcher/launcher.h" | 10 #include "ash/launcher/launcher.h" |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 Config::SHALLOWER_THAN_SELECTED_Y_OFFSETS); | 355 Config::SHALLOWER_THAN_SELECTED_Y_OFFSETS); |
356 // Hide workspaces for which there is no y offset specified. | 356 // Hide workspaces for which there is no y offset specified. |
357 return y_offsets.GetSize(); | 357 return y_offsets.GetSize(); |
358 } | 358 } |
359 | 359 |
360 WorkspaceCyclerAnimator::WorkspaceCyclerAnimator(Delegate* delegate) | 360 WorkspaceCyclerAnimator::WorkspaceCyclerAnimator(Delegate* delegate) |
361 : delegate_(delegate), | 361 : delegate_(delegate), |
362 initial_active_workspace_index_(0), | 362 initial_active_workspace_index_(0), |
363 selected_workspace_index_(0), | 363 selected_workspace_index_(0), |
364 scroll_delta_(0), | 364 scroll_delta_(0), |
365 animation_type_(NONE), | 365 animation_type_(NONE) {} |
366 launcher_background_controller_(NULL), | |
367 style_calculator_(NULL) { | |
368 } | |
369 | 366 |
370 WorkspaceCyclerAnimator::~WorkspaceCyclerAnimator() { | 367 WorkspaceCyclerAnimator::~WorkspaceCyclerAnimator() { |
371 StopObservingImplicitAnimations(); | 368 StopObservingImplicitAnimations(); |
372 animation_type_ = NONE; | 369 animation_type_ = NONE; |
373 } | 370 } |
374 | 371 |
375 void WorkspaceCyclerAnimator::Init(const std::vector<Workspace*>& workspaces, | 372 void WorkspaceCyclerAnimator::Init(const std::vector<Workspace*>& workspaces, |
376 Workspace* initial_active_workspace) { | 373 Workspace* initial_active_workspace) { |
377 workspaces_ = workspaces; | 374 workspaces_ = workspaces; |
378 | 375 |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 base::MessageLoopForUI::current()->PostTask( | 725 base::MessageLoopForUI::current()->PostTask( |
729 FROM_HERE, | 726 FROM_HERE, |
730 base::Bind(&WorkspaceCyclerAnimator::NotifyDelegate, | 727 base::Bind(&WorkspaceCyclerAnimator::NotifyDelegate, |
731 AsWeakPtr(), | 728 AsWeakPtr(), |
732 completed_animation)); | 729 completed_animation)); |
733 } | 730 } |
734 } | 731 } |
735 | 732 |
736 } // namespace internal | 733 } // namespace internal |
737 } // namespace ash | 734 } // namespace ash |
OLD | NEW |