summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-01 07:16:14 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-01 07:16:14 +0000
commit9861f175f93a2fb3b7ab48df78622c311f9fa8f9 (patch)
tree28c225f59d56a55619caf033c0c199f2e17d609e /ash/shell.cc
parent6bc34b9d3b72c666e67d7e81ae60dbe544abcf65 (diff)
downloadchromium_src-9861f175f93a2fb3b7ab48df78622c311f9fa8f9.zip
chromium_src-9861f175f93a2fb3b7ab48df78622c311f9fa8f9.tar.gz
chromium_src-9861f175f93a2fb3b7ab48df78622c311f9fa8f9.tar.bz2
ash: Holding down shift slows window animations for debugging
* Adds SlowAnimationEventFilter to look for raw shift-press events * Adds tests for above * Adds "slow animation mode" to layer animator that slows down layer animations by a factor of 4 for visual testing/debugging * Fixes some typos in comments I elected to make this a new event filter because I can't accomplish this with a regular accelerator and I didn't want to pollute any of the existing filters with this functionality. BUG=130168 TEST=aura_shell_unittests SlowAnimationEventFilterTest, hold down shift and maximize/restore windows Review URL: https://chromiumcodereview.appspot.com/10456034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r--ash/shell.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/ash/shell.cc b/ash/shell.cc
index a4053fc..84f1663 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -48,6 +48,7 @@
#include "ash/wm/screen_dimmer.h"
#include "ash/wm/shadow_controller.h"
#include "ash/wm/shelf_layout_manager.h"
+#include "ash/wm/slow_animation_event_filter.h"
#include "ash/wm/stacking_controller.h"
#include "ash/wm/status_area_layout_manager.h"
#include "ash/wm/system_gesture_event_filter.h"
@@ -557,11 +558,13 @@ Shell::Shell(ShellDelegate* delegate)
Shell::~Shell() {
views::FocusManagerFactory::Install(NULL);
+ // Please keep in same order as in Init() because it's easy to miss one.
RemoveRootWindowEventFilter(key_rewriter_filter_.get());
RemoveRootWindowEventFilter(partial_screenshot_filter_.get());
RemoveRootWindowEventFilter(input_method_filter_.get());
RemoveRootWindowEventFilter(window_modality_controller_.get());
RemoveRootWindowEventFilter(system_gesture_filter_.get());
+ RemoveRootWindowEventFilter(slow_animation_filter_.get());
#if !defined(OS_MACOSX)
RemoveRootWindowEventFilter(accelerator_filter_.get());
#endif
@@ -584,7 +587,7 @@ Shell::~Shell() {
system_tray_.reset();
tray_delegate_.reset();
- // Desroy secondary monitor's widgets before all the windows are destroyed.
+ // Destroy secondary monitor's widgets before all the windows are destroyed.
monitor_controller_.reset();
// Delete containers now so that child windows does not access
@@ -704,6 +707,9 @@ void Shell::Init() {
system_gesture_filter_.reset(new internal::SystemGestureEventFilter);
AddRootWindowEventFilter(system_gesture_filter_.get());
+ slow_animation_filter_.reset(new internal::SlowAnimationEventFilter);
+ AddRootWindowEventFilter(slow_animation_filter_.get());
+
root_window->SetCursor(ui::kCursorPointer);
if (initially_hide_cursor_)
root_window->ShowCursor(false);