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

Unified Diff: ui/aura_shell/root_window_event_filter.cc

Issue 8894018: Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « ui/aura_shell/root_window_event_filter.h ('k') | ui/aura_shell/root_window_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/root_window_event_filter.cc
===================================================================
--- ui/aura_shell/root_window_event_filter.cc (revision 114022)
+++ ui/aura_shell/root_window_event_filter.cc (working copy)
@@ -8,8 +8,9 @@
#include "ui/aura/focus_manager.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window_delegate.h"
+#include "ui/aura_shell/activation_controller.h"
#include "ui/aura_shell/shell.h"
-#include "ui/aura_shell/stacking_controller.h"
+#include "ui/aura_shell/window_util.h"
#include "ui/base/hit_test.h"
namespace aura_shell {
@@ -79,7 +80,7 @@
return true;
if (event->type() == ui::ET_MOUSE_PRESSED)
- ActivateIfNecessary(target, event);
+ target->GetFocusManager()->SetFocusedWindow(target);
return false;
}
@@ -92,24 +93,13 @@
return status;
if (event->type() == ui::ET_TOUCH_PRESSED)
- ActivateIfNecessary(target, event);
+ target->GetFocusManager()->SetFocusedWindow(target);
return ui::TOUCH_STATUS_UNKNOWN;
}
////////////////////////////////////////////////////////////////////////////////
// RootWindowEventFilter, private:
-void RootWindowEventFilter::ActivateIfNecessary(aura::Window* window,
- aura::Event* event) {
- aura::Window* activatable = StackingController::GetActivatableWindow(window);
- if (activatable == aura::RootWindow::GetInstance()->active_window()) {
- // |window| is a descendant of the active window, no need to activate.
- window->GetFocusManager()->SetFocusedWindow(window);
- } else {
- aura::RootWindow::GetInstance()->SetActiveWindow(activatable, window);
- }
-}
-
void RootWindowEventFilter::UpdateCursor(aura::Window* target,
aura::MouseEvent* event) {
gfx::NativeCursor cursor = target->GetCursor(event->location());
« no previous file with comments | « ui/aura_shell/root_window_event_filter.h ('k') | ui/aura_shell/root_window_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698