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

Unified Diff: ui/aura/shared/root_window_event_filter.cc

Issue 10332145: aura/ash split: Moves RootWindowEventFilter and InputMethodEventFilter to ui/aura/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved to ui/aura/shared/ Created 8 years, 7 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
Index: ui/aura/shared/root_window_event_filter.cc
diff --git a/ash/wm/root_window_event_filter.cc b/ui/aura/shared/root_window_event_filter.cc
similarity index 94%
rename from ash/wm/root_window_event_filter.cc
rename to ui/aura/shared/root_window_event_filter.cc
index 1fb086babbd8a38c345fb95e3cab6045a50e8828..a1454ec0e45ecc9f2b4c6766fe667982e5f90495 100644
--- a/ash/wm/root_window_event_filter.cc
+++ b/ui/aura/shared/root_window_event_filter.cc
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/wm/root_window_event_filter.h"
+#include "ui/aura/shared/root_window_event_filter.h"
-#include "ash/wm/window_util.h"
+#include "ui/aura/client/activation_client.h"
#include "ui/aura/event.h"
#include "ui/aura/focus_manager.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window_delegate.h"
#include "ui/base/hit_test.h"
-namespace ash {
-namespace internal {
+namespace aura {
+namespace shared {
namespace {
@@ -122,7 +122,7 @@ bool RootWindowEventFilter::PreHandleMouseEvent(aura::Window* target,
if (FilterMouseEvent(target, event))
return true;
- if (event->type() == ui::ET_MOUSE_PRESSED && wm::GetActiveWindow() != target)
+ if (event->type() == ui::ET_MOUSE_PRESSED && GetActiveWindow() != target)
target->GetFocusManager()->SetFocusedWindow(
FindFocusableWindowFor(target), event);
@@ -226,5 +226,10 @@ ui::TouchStatus RootWindowEventFilter::FilterTouchEvent(
return status;
}
-} // namespace internal
-} // namespace ash
+Window* RootWindowEventFilter::GetActiveWindow() {
+ return aura::client::GetActivationClient(root_window_)->
+ GetActiveWindow();
+}
+
+} // namespace shared
+} // namespace aura

Powered by Google App Engine
This is Rietveld 408576698