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

Unified Diff: ash/wm/workspace/workspace_event_handler_aura.cc

Issue 2285703003: Moves WorkspaceEventHandler to ash/common (Closed)
Patch Set: merge 2 trunk Created 4 years, 4 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: ash/wm/workspace/workspace_event_handler_aura.cc
diff --git a/ash/wm/workspace/workspace_event_handler_aura.cc b/ash/wm/workspace/workspace_event_handler_aura.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5fd42e4616d634d54da6b08e7cb7b4db548fc1c7
--- /dev/null
+++ b/ash/wm/workspace/workspace_event_handler_aura.cc
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/wm/workspace/workspace_event_handler_aura.h"
+
+#include "ash/aura/wm_window_aura.h"
+#include "ui/aura/window.h"
+#include "ui/events/event.h"
+
+namespace ash {
+
+WorkspaceEventHandlerAura::WorkspaceEventHandlerAura(WmWindow* workspace_window)
+ : workspace_window_(workspace_window) {
+ workspace_window_->AddLimitedPreTargetHandler(this);
+}
+
+WorkspaceEventHandlerAura::~WorkspaceEventHandlerAura() {
+ workspace_window_->RemoveLimitedPreTargetHandler(this);
+}
+
+void WorkspaceEventHandlerAura::OnMouseEvent(ui::MouseEvent* event) {
+ WorkspaceEventHandler::OnMouseEvent(
+ event, WmWindowAura::Get(static_cast<aura::Window*>(event->target())));
+}
+
+void WorkspaceEventHandlerAura::OnGestureEvent(ui::GestureEvent* event) {
+ WorkspaceEventHandler::OnGestureEvent(
+ event, WmWindowAura::Get(static_cast<aura::Window*>(event->target())));
+}
+
+} // namespace ash
« no previous file with comments | « ash/wm/workspace/workspace_event_handler_aura.h ('k') | ash/wm/workspace/workspace_event_handler_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698