diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-30 01:32:02 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-30 01:32:02 +0000 |
commit | b5756e205e33a1c982d5a97bc3b352f1850c8519 (patch) | |
tree | 523c101267d84a6598ff940d63f0592db15744a5 /ash/shell.cc | |
parent | fa73836b5058c72ce7d0d052e2d133da8f43629d (diff) | |
download | chromium_src-b5756e205e33a1c982d5a97bc3b352f1850c8519.zip chromium_src-b5756e205e33a1c982d5a97bc3b352f1850c8519.tar.gz chromium_src-b5756e205e33a1c982d5a97bc3b352f1850c8519.tar.bz2 |
Move VisibilityController to corewm.
I had to add a subclass to Ash for the time being to allow Ash to call its method for animating windows, which handles a few animation types corewm doesn't know about. I'd like to clean this up a bit in a future CL, see my TODO.
http://crbug.com/158115
R=sky@chromium.org
Review URL: https://codereview.chromium.org/11316245
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r-- | ash/shell.cc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/ash/shell.cc b/ash/shell.cc index 57193ed..2cf7c5a 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -58,7 +58,7 @@ #include "ash/wm/system_modal_container_layout_manager.h" #include "ash/wm/user_activity_detector.h" #include "ash/wm/video_detector.h" -#include "ash/wm/visibility_controller.h" +#include "ash/wm/window_animations.h" #include "ash/wm/window_cycle_controller.h" #include "ash/wm/window_modality_controller.h" #include "ash/wm/window_properties.h" @@ -86,6 +86,7 @@ #include "ui/views/corewm/compound_event_filter.h" #include "ui/views/corewm/input_method_event_filter.h" #include "ui/views/corewm/shadow_controller.h" +#include "ui/views/corewm/visibility_controller.h" #include "ui/views/focus/focus_manager_factory.h" #include "ui/views/widget/native_widget_aura.h" #include "ui/views/widget/widget.h" @@ -154,6 +155,24 @@ class DummyUserWallpaperDelegate : public UserWallpaperDelegate { DISALLOW_COPY_AND_ASSIGN(DummyUserWallpaperDelegate); }; +// A Corewm VisibilityController subclass that calls the Ash animation routine +// so we can pick up our extended animations. See ash/wm/window_animations.h. +class AshVisibilityController : public views::corewm::VisibilityController { + public: + AshVisibilityController() {} + virtual ~AshVisibilityController() {} + + private: + // Overridden from views::corewm::VisibilityController: + virtual bool CallAnimateOnChildWindowVisibilityChanged( + aura::Window* window, + bool visible) OVERRIDE { + return AnimateOnChildWindowVisibilityChanged(window, visible); + } + + DISALLOW_COPY_AND_ASSIGN(AshVisibilityController); +}; + } // namespace // static @@ -486,7 +505,7 @@ void Shell::Init() { stacking_client_.reset(delegate_->CreateStackingClient()); if (stacking_client_.get()) aura::client::SetStackingClient(stacking_client_.get()); - visibility_controller_.reset(new internal::VisibilityController); + visibility_controller_.reset(new AshVisibilityController); drag_drop_controller_.reset(new internal::DragDropController); user_action_client_.reset(delegate_->CreateUserActionClient()); window_modality_controller_.reset(new internal::WindowModalityController); |