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

Unified Diff: ash/display/display_animator.h

Issue 1594683002: Introduce DisplayConfigurationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_576375_display1b1
Patch Set: Rebase Created 4 years, 11 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 | « ash/ash.gyp ('k') | ash/display/display_animator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_animator.h
diff --git a/ash/display/display_animator.h b/ash/display/display_animator.h
index 81c60053d4aa92618f401c8d1b9f44be927b644b..527b0f5b8b73631c4c22d1f7faf80341f754003e 100644
--- a/ash/display/display_animator.h
+++ b/ash/display/display_animator.h
@@ -9,57 +9,24 @@
#include "ash/ash_export.h"
#include "base/callback.h"
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "base/timer/timer.h"
-#include "ui/display/chromeos/display_configurator.h"
-
-namespace aura {
-class RootWindow;
-class Window;
-} // namespace aura
-
-namespace ui {
-class Layer;
-} // namespace ui
namespace ash {
-// DisplayAnimator provides the visual effects for
-// ui::DisplayConfigurator, such like fade-out/in during changing
-// the display mode.
-class ASH_EXPORT DisplayAnimator : public ui::DisplayConfigurator::Observer {
+// Interface class for animating display changes.
+class ASH_EXPORT DisplayAnimator {
public:
- DisplayAnimator();
- ~DisplayAnimator() override;
+ virtual ~DisplayAnimator() {}
- // Starts the fade-out animation for the all root windows. It will
+ // Starts the fade-out animation for the all root windows. It will
// call |callback| once all of the animations have finished.
- void StartFadeOutAnimation(base::Closure callback);
+ virtual void StartFadeOutAnimation(base::Closure callback) = 0;
// Starts the animation to clear the fade-out animation effect
// for the all root windows.
- void StartFadeInAnimation();
-
- protected:
- // ui::DisplayConfigurator::Observer overrides:
- void OnDisplayModeChanged(
- const ui::DisplayConfigurator::DisplayStateList& outputs) override;
- void OnDisplayModeChangeFailed(
- const ui::DisplayConfigurator::DisplayStateList& displays,
- ui::MultipleDisplayState failed_new_state) override;
+ virtual void StartFadeInAnimation() = 0;
private:
- // Clears all hiding layers. Note that in case that this method is called
- // during an animation, the method call will cancel all of the animations
- // and *not* call the registered callback.
- void ClearHidingLayers();
-
- std::map<aura::Window*, ui::Layer*> hiding_layers_;
- scoped_ptr<base::OneShotTimer> timer_;
- base::WeakPtrFactory<DisplayAnimator> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayAnimator);
+ DISALLOW_ASSIGN(DisplayAnimator);
};
} // namespace ash
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/display_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698