summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-07 17:15:48 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-07 17:15:48 +0000
commit049cf34bd4341fedb1eefb76423ec693e06c19d9 (patch)
tree3fabeedc694cec8b7cb46543834a24d6d1df4752 /ash/shell.cc
parentf216b7e872af2863e0114a2fe4cfdff60cad5912 (diff)
downloadchromium_src-049cf34bd4341fedb1eefb76423ec693e06c19d9.zip
chromium_src-049cf34bd4341fedb1eefb76423ec693e06c19d9.tar.gz
chromium_src-049cf34bd4341fedb1eefb76423ec693e06c19d9.tar.bz2
More ash_unittests run without crashing/pass with new focus controller.
. Listen for ActivationChanged events to minimized windows on BaseLayoutManager and show the activated window (BLM is also responsible for hiding minimized windows) . Stop the annoying cursor movement for RWHWin while the tests are running. There's never a reason for us to do this on win32. . Listen for FocusChanging events in the DeleteOnBlur delegate in RootWindowControllerTest. Currently calls StopPropagation since the handler is deleted. Will not be necessary after sadrul's latest. . Shell keeps track of active root window now as an activation event handler (in the old world, the ActivationController manually updated this). . TestActivationDelegate is also an activation event handler. . FocusController responds to hides on visibility changED vs changING since that's necessary to restore activation properly after hiding a system modal window. http://crbug.com/162100 R=sadrul@chromium.org Review URL: https://codereview.chromium.org/11446050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r--ash/shell.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/ash/shell.cc b/ash/shell.cc
index 5d8b830..4e6580a 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -85,6 +85,7 @@
#include "ui/ui_controls/ui_controls.h"
#include "ui/views/corewm/compound_event_filter.h"
#include "ui/views/corewm/corewm_switches.h"
+#include "ui/views/corewm/focus_change_event.h"
#include "ui/views/corewm/focus_controller.h"
#include "ui/views/corewm/input_method_event_filter.h"
#include "ui/views/corewm/shadow_controller.h"
@@ -246,6 +247,7 @@ Shell::Shell(ShellDelegate* delegate)
base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow(
output_configurator());
#endif // defined(OS_CHROMEOS)
+ AddPreTargetHandler(this);
}
Shell::~Shell() {
@@ -887,6 +889,9 @@ bool Shell::CanWindowReceiveEvents(aura::Window* window) {
return false;
}
+////////////////////////////////////////////////////////////////////////////////
+// Shell, ui::EventTarget overrides:
+
bool Shell::CanAcceptEvent(const ui::Event& event) {
return true;
}
@@ -895,4 +900,12 @@ ui::EventTarget* Shell::GetParentTarget() {
return NULL;
}
+void Shell::OnEvent(ui::Event* event) {
+ if (event->type() ==
+ views::corewm::FocusChangeEvent::activation_changed_event_type()) {
+ active_root_window_ =
+ static_cast<aura::Window*>(event->target())->GetRootWindow();
+ }
+}
+
} // namespace ash