summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstevenjb <stevenjb@chromium.org>2016-01-15 16:30:49 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-16 00:32:53 +0000
commitf402ac57b2125147a565f6340b854807ead6aad3 (patch)
treee8a9d588efc74461b3ddbac2013447ae658615bd
parentf85424718ca7a8ea3f330141ee68b717ae02f2f0 (diff)
downloadchromium_src-f402ac57b2125147a565f6340b854807ead6aad3.zip
chromium_src-f402ac57b2125147a565f6340b854807ead6aad3.tar.gz
chromium_src-f402ac57b2125147a565f6340b854807ead6aad3.tar.bz2
Rename DisplayConfiguratorAnimation to DisplayAnimator
Also cleans up the class to new style guide some. BUG=576375 Review URL: https://codereview.chromium.org/1590463004 Cr-Commit-Position: refs/heads/master@{#369893}
-rw-r--r--ash/BUILD.gn4
-rw-r--r--ash/ash.gyp8
-rw-r--r--ash/display/display_animator.cc (renamed from ash/display/display_configurator_animation.cc)80
-rw-r--r--ash/display/display_animator.h (renamed from ash/display/display_configurator_animation.h)19
-rw-r--r--ash/display/display_manager.cc7
-rw-r--r--ash/display/window_tree_host_manager.cc12
-rw-r--r--ash/shell.cc11
-rw-r--r--ash/shell.h8
-rw-r--r--ash/test/ash_test_helper.cc2
-rw-r--r--ash/test/shell_test_api.cc10
-rw-r--r--ash/test/shell_test_api.h2
-rw-r--r--chrome/browser/ui/webui/options/chromeos/display_options_handler.cc23
12 files changed, 77 insertions, 109 deletions
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index 7b0919c..5479a4d 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -113,8 +113,8 @@ component("ash") {
"accelerators/magnifier_key_scroller.h",
"accelerators/spoken_feedback_toggler.cc",
"accelerators/spoken_feedback_toggler.h",
- "display/display_configurator_animation.cc",
- "display/display_configurator_animation.h",
+ "display/display_animator.cc",
+ "display/display_animator.h",
"display/resolution_notification_controller.cc",
"display/resolution_notification_controller.h",
"system/tray/media_security/media_capture_observer.h",
diff --git a/ash/ash.gyp b/ash/ash.gyp
index 6b695b5..f87be98 100644
--- a/ash/ash.gyp
+++ b/ash/ash.gyp
@@ -63,12 +63,12 @@
'desktop_background/user_wallpaper_delegate.h',
'display/cursor_window_controller.cc',
'display/cursor_window_controller.h',
+ 'display/display_animator.cc',
+ 'display/display_animator.h',
'display/display_change_observer_chromeos.cc',
'display/display_change_observer_chromeos.h',
'display/display_color_manager_chromeos.cc',
'display/display_color_manager_chromeos.h',
- 'display/display_configurator_animation.cc',
- 'display/display_configurator_animation.h',
'display/window_tree_host_manager.cc',
'display/window_tree_host_manager.h',
'display/display_error_observer_chromeos.cc',
@@ -1033,8 +1033,8 @@
'accelerators/magnifier_key_scroller.h',
'accelerators/spoken_feedback_toggler.cc',
'accelerators/spoken_feedback_toggler.h',
- 'display/display_configurator_animation.cc',
- 'display/display_configurator_animation.h',
+ 'display/display_animator.cc',
+ 'display/display_animator.h',
'display/resolution_notification_controller.cc',
'display/resolution_notification_controller.h',
'system/tray/media_security/media_capture_observer.h',
diff --git a/ash/display/display_configurator_animation.cc b/ash/display/display_animator.cc
index dbbe00b..8348302 100644
--- a/ash/display/display_configurator_animation.cc
+++ b/ash/display/display_animator.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/display/display_configurator_animation.h"
+#include "ash/display/display_animator.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
@@ -28,9 +28,7 @@ const int kFadingTimeoutDurationInSeconds = 10;
class CallbackRunningObserver {
public:
CallbackRunningObserver(base::Closure callback)
- : completed_counter_(0),
- animation_aborted_(false),
- callback_(callback) {}
+ : completed_counter_(0), animation_aborted_(false), callback_(callback) {}
void AddNewAnimator(ui::LayerAnimator* animator) {
Observer* observer = new Observer(animator, this);
@@ -56,10 +54,8 @@ class CallbackRunningObserver {
// The actual observer to listen each animation completion.
class Observer : public ui::LayerAnimationObserver {
public:
- Observer(ui::LayerAnimator* animator,
- CallbackRunningObserver* observer)
- : animator_(animator),
- observer_(observer) {}
+ Observer(ui::LayerAnimator* animator, CallbackRunningObserver* observer)
+ : animator_(animator), observer_(observer) {}
protected:
// ui::LayerAnimationObserver overrides:
@@ -95,16 +91,13 @@ class CallbackRunningObserver {
} // namespace
-DisplayConfiguratorAnimation::DisplayConfiguratorAnimation()
- : weak_ptr_factory_(this) {
-}
+DisplayAnimator::DisplayAnimator() : weak_ptr_factory_(this) {}
-DisplayConfiguratorAnimation::~DisplayConfiguratorAnimation() {
+DisplayAnimator::~DisplayAnimator() {
ClearHidingLayers();
}
-void DisplayConfiguratorAnimation::StartFadeOutAnimation(
- base::Closure callback) {
+void DisplayAnimator::StartFadeOutAnimation(base::Closure callback) {
CallbackRunningObserver* observer = new CallbackRunningObserver(callback);
ClearHidingLayers();
@@ -112,24 +105,20 @@ void DisplayConfiguratorAnimation::StartFadeOutAnimation(
// hiding the root windows, we put a black layer over a root window for
// safety. These layers remain to hide root windows and will be deleted
// after the animation of OnDisplayModeChanged().
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- for (aura::Window::Windows::const_iterator it = root_windows.begin();
- it != root_windows.end(); ++it) {
- aura::Window* root_window = *it;
+ for (aura::Window* root_window : Shell::GetInstance()->GetAllRootWindows()) {
ui::Layer* hiding_layer = new ui::Layer(ui::LAYER_SOLID_COLOR);
hiding_layer->SetColor(SK_ColorBLACK);
hiding_layer->SetBounds(root_window->bounds());
- ui::Layer* parent =
- ash::Shell::GetContainer(root_window,
- ash::kShellWindowId_OverlayContainer)->layer();
+ ui::Layer* parent = ash::Shell::GetContainer(
+ root_window, ash::kShellWindowId_OverlayContainer)
+ ->layer();
parent->Add(hiding_layer);
hiding_layer->SetOpacity(0.0);
ui::ScopedLayerAnimationSettings settings(hiding_layer->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
- kFadingAnimationDurationInMS));
+ settings.SetTransitionDuration(
+ base::TimeDelta::FromMilliseconds(kFadingAnimationDurationInMS));
observer->AddNewAnimator(hiding_layer->GetAnimator());
hiding_layer->SetOpacity(1.0f);
hiding_layer->SetVisible(true);
@@ -142,23 +131,20 @@ void DisplayConfiguratorAnimation::StartFadeOutAnimation(
timer_.reset(new base::OneShotTimer());
timer_->Start(FROM_HERE,
base::TimeDelta::FromSeconds(kFadingTimeoutDurationInSeconds),
- this,
- &DisplayConfiguratorAnimation::ClearHidingLayers);
+ this, &DisplayAnimator::ClearHidingLayers);
}
-void DisplayConfiguratorAnimation::StartFadeInAnimation() {
+void DisplayAnimator::StartFadeInAnimation() {
// We want to make sure clearing all of hiding layers after the animation
// finished. Note that this callback can be canceled, but the cancel only
// happens when the next animation is scheduled. Thus the hiding layers
// should be deleted eventually.
- CallbackRunningObserver* observer = new CallbackRunningObserver(
- base::Bind(&DisplayConfiguratorAnimation::ClearHidingLayers,
- weak_ptr_factory_.GetWeakPtr()));
+ CallbackRunningObserver* observer = new CallbackRunningObserver(base::Bind(
+ &DisplayAnimator::ClearHidingLayers, weak_ptr_factory_.GetWeakPtr()));
// Ensure that layers are not animating.
- for (std::map<aura::Window*, ui::Layer*>::iterator it =
- hiding_layers_.begin(); it != hiding_layers_.end(); ++it) {
- ui::LayerAnimator* animator = it->second->GetAnimator();
+ for (std::map<aura::Window*, ui::Layer*>::value_type& e : hiding_layers_) {
+ ui::LayerAnimator* animator = e.second->GetAnimator();
if (animator->is_animating())
animator->StopAnimating();
}
@@ -166,12 +152,8 @@ void DisplayConfiguratorAnimation::StartFadeInAnimation() {
// Schedules the fade-in effect for all root windows. Because we put the
// black layers for fade-out, here we actually turn those black layers
// invisible.
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- for (aura::Window::Windows::const_iterator it = root_windows.begin();
- it != root_windows.end(); ++it) {
- aura::Window* root_window = *it;
- ui::Layer* hiding_layer = NULL;
+ for (aura::Window* root_window : Shell::GetInstance()->GetAllRootWindows()) {
+ ui::Layer* hiding_layer = nullptr;
if (hiding_layers_.find(root_window) == hiding_layers_.end()) {
// In case of the transition from mirroring->non-mirroring, new root
// windows appear and we do not have the black layers for them. Thus
@@ -179,9 +161,9 @@ void DisplayConfiguratorAnimation::StartFadeInAnimation() {
hiding_layer = new ui::Layer(ui::LAYER_SOLID_COLOR);
hiding_layer->SetColor(SK_ColorBLACK);
hiding_layer->SetBounds(root_window->bounds());
- ui::Layer* parent =
- ash::Shell::GetContainer(
- root_window, ash::kShellWindowId_OverlayContainer)->layer();
+ ui::Layer* parent = ash::Shell::GetContainer(
+ root_window, ash::kShellWindowId_OverlayContainer)
+ ->layer();
parent->Add(hiding_layer);
hiding_layer->SetOpacity(1.0f);
hiding_layer->SetVisible(true);
@@ -193,34 +175,34 @@ void DisplayConfiguratorAnimation::StartFadeInAnimation() {
}
ui::ScopedLayerAnimationSettings settings(hiding_layer->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
- kFadingAnimationDurationInMS));
+ settings.SetTransitionDuration(
+ base::TimeDelta::FromMilliseconds(kFadingAnimationDurationInMS));
observer->AddNewAnimator(hiding_layer->GetAnimator());
hiding_layer->SetOpacity(0.0f);
hiding_layer->SetVisible(false);
}
}
-void DisplayConfiguratorAnimation::OnDisplayModeChanged(
+void DisplayAnimator::OnDisplayModeChanged(
const ui::DisplayConfigurator::DisplayStateList& displays) {
if (!hiding_layers_.empty())
StartFadeInAnimation();
}
-void DisplayConfiguratorAnimation::OnDisplayModeChangeFailed(
+void DisplayAnimator::OnDisplayModeChangeFailed(
const ui::DisplayConfigurator::DisplayStateList& displays,
ui::MultipleDisplayState failed_new_state) {
if (!hiding_layers_.empty())
StartFadeInAnimation();
}
-void DisplayConfiguratorAnimation::ClearHidingLayers() {
+void DisplayAnimator::ClearHidingLayers() {
if (timer_) {
timer_->Stop();
timer_.reset();
}
- STLDeleteContainerPairSecondPointers(
- hiding_layers_.begin(), hiding_layers_.end());
+ STLDeleteContainerPairSecondPointers(hiding_layers_.begin(),
+ hiding_layers_.end());
hiding_layers_.clear();
}
diff --git a/ash/display/display_configurator_animation.h b/ash/display/display_animator.h
index 567c9f1..81c6005 100644
--- a/ash/display/display_configurator_animation.h
+++ b/ash/display/display_animator.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_DISPLAY_DISPLAY_CONFIGURATOR_ANIMATION_H_
-#define ASH_DISPLAY_DISPLAY_CONFIGURATOR_ANIMATION_H_
+#ifndef ASH_DISPLAY_DISPLAY_ANIMATOR_H_
+#define ASH_DISPLAY_DISPLAY_ANIMATOR_H_
#include <map>
@@ -25,14 +25,13 @@ class Layer;
namespace ash {
-// DisplayConfiguratorAnimation provides the visual effects for
+// DisplayAnimator provides the visual effects for
// ui::DisplayConfigurator, such like fade-out/in during changing
// the display mode.
-class ASH_EXPORT DisplayConfiguratorAnimation
- : public ui::DisplayConfigurator::Observer {
+class ASH_EXPORT DisplayAnimator : public ui::DisplayConfigurator::Observer {
public:
- DisplayConfiguratorAnimation();
- ~DisplayConfiguratorAnimation() override;
+ DisplayAnimator();
+ ~DisplayAnimator() override;
// Starts the fade-out animation for the all root windows. It will
// call |callback| once all of the animations have finished.
@@ -58,11 +57,11 @@ class ASH_EXPORT DisplayConfiguratorAnimation
std::map<aura::Window*, ui::Layer*> hiding_layers_;
scoped_ptr<base::OneShotTimer> timer_;
- base::WeakPtrFactory<DisplayConfiguratorAnimation> weak_ptr_factory_;
+ base::WeakPtrFactory<DisplayAnimator> weak_ptr_factory_;
- DISALLOW_COPY_AND_ASSIGN(DisplayConfiguratorAnimation);
+ DISALLOW_COPY_AND_ASSIGN(DisplayAnimator);
};
} // namespace ash
-#endif // ASH_DISPLAY_DISPLAY_CONFIGURATION_CONTROLLER_H_
+#endif // ASH_DISPLAY_DISPLAY_ANIMATOR_H_
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc
index fe7f243..5d47aba 100644
--- a/ash/display/display_manager.cc
+++ b/ash/display/display_manager.cc
@@ -43,7 +43,7 @@
#endif
#if defined(OS_CHROMEOS)
-#include "ash/display/display_configurator_animation.h"
+#include "ash/display/display_animator.h"
#include "base/sys_info.h"
#endif
@@ -948,9 +948,8 @@ void DisplayManager::SetMirrorMode(bool mirror) {
multi_display_mode_ =
mirror ? MIRRORING : current_default_multi_display_mode_;
ReconfigureDisplays();
- if (Shell::GetInstance()->display_configurator_animation()) {
- Shell::GetInstance()->display_configurator_animation()->
- StartFadeInAnimation();
+ if (Shell::GetInstance()->display_animator()) {
+ Shell::GetInstance()->display_animator()->StartFadeInAnimation();
}
RunPendingTasksForTest();
#endif
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc
index 8f2ba2e..70dd1b9 100644
--- a/ash/display/window_tree_host_manager.cc
+++ b/ash/display/window_tree_host_manager.cc
@@ -49,7 +49,7 @@
#include "ui/wm/public/activation_client.h"
#if defined(OS_CHROMEOS)
-#include "ash/display/display_configurator_animation.h"
+#include "ash/display/display_animator.h"
#include "base/sys_info.h"
#include "base/time/time.h"
#endif // defined(OS_CHROMEOS)
@@ -438,8 +438,7 @@ void WindowTreeHostManager::ToggleMirrorMode() {
}
#if defined(OS_CHROMEOS)
Shell* shell = Shell::GetInstance();
- DisplayConfiguratorAnimation* animation =
- shell->display_configurator_animation();
+ DisplayAnimator* animation = shell->display_animator();
animation->StartFadeOutAnimation(base::Bind(
&WindowTreeHostManager::SetMirrorModeAfterAnimation,
weak_ptr_factory_.GetWeakPtr(), !display_manager->IsInMirrorMode()));
@@ -455,8 +454,7 @@ void WindowTreeHostManager::SwapPrimaryDisplay() {
if (Shell::GetScreen()->GetNumDisplays() > 1) {
#if defined(OS_CHROMEOS)
- DisplayConfiguratorAnimation* animation =
- Shell::GetInstance()->display_configurator_animation();
+ DisplayAnimator* animation = Shell::GetInstance()->display_animator();
if (animation) {
animation->StartFadeOutAnimation(
base::Bind(&WindowTreeHostManager::OnFadeOutForSwapDisplayFinished,
@@ -924,9 +922,7 @@ AshWindowTreeHost* WindowTreeHostManager::AddWindowTreeHostForDisplay(
void WindowTreeHostManager::OnFadeOutForSwapDisplayFinished() {
#if defined(OS_CHROMEOS)
SetPrimaryDisplay(ScreenUtil::GetSecondaryDisplay());
- Shell::GetInstance()
- ->display_configurator_animation()
- ->StartFadeInAnimation();
+ Shell::GetInstance()->display_animator()->StartFadeInAnimation();
#endif
}
diff --git a/ash/shell.cc b/ash/shell.cc
index 192d9d7..7c36c8e 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -120,9 +120,9 @@
#include "ash/accelerators/magnifier_key_scroller.h"
#include "ash/accelerators/spoken_feedback_toggler.h"
#include "ash/ash_constants.h"
+#include "ash/display/display_animator.h"
#include "ash/display/display_change_observer_chromeos.h"
#include "ash/display/display_color_manager_chromeos.h"
-#include "ash/display/display_configurator_animation.h"
#include "ash/display/display_error_observer_chromeos.h"
#include "ash/display/projecting_observer_chromeos.h"
#include "ash/display/resolution_notification_controller.h"
@@ -814,9 +814,8 @@ Shell::~Shell() {
display_color_manager_.reset();
if (display_change_observer_)
display_configurator_->RemoveObserver(display_change_observer_.get());
- if (display_configurator_animation_)
- display_configurator_->RemoveObserver(
- display_configurator_animation_.get());
+ if (display_animator_)
+ display_configurator_->RemoveObserver(display_animator_.get());
if (display_error_observer_)
display_configurator_->RemoveObserver(display_error_observer_.get());
if (projecting_observer_) {
@@ -840,8 +839,8 @@ void Shell::Init(const ShellInitParams& init_params) {
bool display_initialized = display_manager_->InitFromCommandLine();
#if defined(OS_CHROMEOS)
display_configurator_->Init(!gpu_support_->IsPanelFittingDisabled());
- display_configurator_animation_.reset(new DisplayConfiguratorAnimation());
- display_configurator_->AddObserver(display_configurator_animation_.get());
+ display_animator_.reset(new DisplayAnimator());
+ display_configurator_->AddObserver(display_animator_.get());
// The DBusThreadManager must outlive this Shell. See the DCHECK in ~Shell.
chromeos::DBusThreadManager* dbus_thread_manager =
diff --git a/ash/shell.h b/ash/shell.h
index 24f6176..8401a6c 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -85,9 +85,9 @@ class AutoclickController;
class BluetoothNotificationController;
class CaptureController;
class DesktopBackgroundController;
+class DisplayAnimator;
class DisplayChangeObserver;
class DisplayColorManager;
-class DisplayConfiguratorAnimation;
class WindowTreeHostManager;
class DisplayErrorObserver;
class DisplayManager;
@@ -523,9 +523,7 @@ class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate,
ui::DisplayConfigurator* display_configurator() {
return display_configurator_.get();
}
- DisplayConfiguratorAnimation* display_configurator_animation() {
- return display_configurator_animation_.get();
- }
+ DisplayAnimator* display_animator() { return display_animator_.get(); }
DisplayErrorObserver* display_error_observer() {
return display_error_observer_.get();
}
@@ -726,7 +724,7 @@ class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate,
// Controls video output device state.
scoped_ptr<ui::DisplayConfigurator> display_configurator_;
scoped_ptr<DisplayColorManager> display_color_manager_;
- scoped_ptr<DisplayConfiguratorAnimation> display_configurator_animation_;
+ scoped_ptr<DisplayAnimator> display_animator_;
scoped_ptr<DisplayErrorObserver> display_error_observer_;
scoped_ptr<ProjectingObserver> projecting_observer_;
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc
index 560f8ef..f5a27b4 100644
--- a/ash/test/ash_test_helper.cc
+++ b/ash/test/ash_test_helper.cc
@@ -128,7 +128,7 @@ void AshTestHelper::SetUp(bool start_session) {
}
test::DisplayManagerTestApi().DisableChangeDisplayUponHostResize();
- ShellTestApi(shell).DisableDisplayConfiguratorAnimation();
+ ShellTestApi(shell).DisableDisplayAnimator();
test_screenshot_delegate_ = new TestScreenshotDelegate();
shell->accelerator_controller()->SetScreenshotDelegate(
diff --git a/ash/test/shell_test_api.cc b/ash/test/shell_test_api.cc
index b85bcab..c9a3bf4 100644
--- a/ash/test/shell_test_api.cc
+++ b/ash/test/shell_test_api.cc
@@ -10,7 +10,7 @@
#include "ash/shell.h"
#if defined(OS_CHROMEOS)
-#include "ash/display/display_configurator_animation.h"
+#include "ash/display/display_animator.h"
#include "ui/display/chromeos/display_configurator.h"
#endif
@@ -51,12 +51,12 @@ AppListController* ShellTestApi::app_list_controller() {
return shell_->app_list_controller_.get();
}
-void ShellTestApi::DisableDisplayConfiguratorAnimation() {
+void ShellTestApi::DisableDisplayAnimator() {
#if defined(OS_CHROMEOS)
- if (shell_->display_configurator_animation_) {
+ if (shell_->display_animator_) {
shell_->display_configurator_->RemoveObserver(
- shell_->display_configurator_animation_.get());
- shell_->display_configurator_animation_.reset();
+ shell_->display_animator_.get());
+ shell_->display_animator_.reset();
}
#endif // defined(OS_CHROMEOS)
}
diff --git a/ash/test/shell_test_api.h b/ash/test/shell_test_api.h
index 654e425..b144f0b 100644
--- a/ash/test/shell_test_api.h
+++ b/ash/test/shell_test_api.h
@@ -37,7 +37,7 @@ public:
DragDropController* drag_drop_controller();
AppListController* app_list_controller();
MaximizeModeWindowManager* maximize_mode_window_manager();
- void DisableDisplayConfiguratorAnimation();
+ void DisableDisplayAnimator();
// Set ShelfDelegate.
void SetShelfDelegate(ShelfDelegate* delegate);
diff --git a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
index 0ece958..a111747 100644
--- a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
@@ -9,7 +9,7 @@
#include <string>
-#include "ash/display/display_configurator_animation.h"
+#include "ash/display/display_animator.h"
#include "ash/display/display_manager.h"
#include "ash/display/resolution_notification_controller.h"
#include "ash/display/window_tree_host_manager.h"
@@ -350,8 +350,7 @@ void DisplayOptionsHandler::OnFadeOutForDisplayLayoutFinished(
int position, int offset) {
SetCurrentDisplayLayout(
ash::DisplayLayout::FromInts(position, offset));
- ash::Shell::GetInstance()->display_configurator_animation()->
- StartFadeInAnimation();
+ ash::Shell::GetInstance()->display_animator()->StartFadeInAnimation();
}
void DisplayOptionsHandler::HandleDisplayInfo(
@@ -365,11 +364,9 @@ void DisplayOptionsHandler::HandleMirroring(const base::ListValue* args) {
base::UserMetricsAction("Options_DisplayToggleMirroring"));
bool is_mirroring = false;
args->GetBoolean(0, &is_mirroring);
- ash::Shell::GetInstance()->display_configurator_animation()->
- StartFadeOutAnimation(base::Bind(
- &DisplayOptionsHandler::OnFadeOutForMirroringFinished,
- base::Unretained(this),
- is_mirroring));
+ ash::Shell::GetInstance()->display_animator()->StartFadeOutAnimation(
+ base::Bind(&DisplayOptionsHandler::OnFadeOutForMirroringFinished,
+ base::Unretained(this), is_mirroring));
}
void DisplayOptionsHandler::HandleSetPrimary(const base::ListValue* args) {
@@ -394,12 +391,10 @@ void DisplayOptionsHandler::HandleDisplayLayout(const base::ListValue* args) {
DCHECK_LE(ash::DisplayLayout::TOP, layout);
DCHECK_GE(ash::DisplayLayout::LEFT, layout);
content::RecordAction(base::UserMetricsAction("Options_DisplayRearrange"));
- ash::Shell::GetInstance()->display_configurator_animation()->
- StartFadeOutAnimation(base::Bind(
- &DisplayOptionsHandler::OnFadeOutForDisplayLayoutFinished,
- base::Unretained(this),
- static_cast<int>(layout),
- static_cast<int>(offset)));
+ ash::Shell::GetInstance()->display_animator()->StartFadeOutAnimation(
+ base::Bind(&DisplayOptionsHandler::OnFadeOutForDisplayLayoutFinished,
+ base::Unretained(this), static_cast<int>(layout),
+ static_cast<int>(offset)));
}
void DisplayOptionsHandler::HandleSetDisplayMode(const base::ListValue* args) {