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

Unified Diff: ash/wm/workspace_controller.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
« no previous file with comments | « ash/wm/workspace/workspace_event_handler_unittest.cc ('k') | ash/wm/workspace_controller_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace_controller.cc
diff --git a/ash/wm/workspace_controller.cc b/ash/wm/workspace_controller.cc
index c8b9bdba7c24f4a5f6237ccbe0277ad9766217fa..7c893ca0117a3104bcd51c2942e4bc42ec5e255e 100644
--- a/ash/wm/workspace_controller.cc
+++ b/ash/wm/workspace_controller.cc
@@ -12,11 +12,12 @@
#include "ash/common/wm/fullscreen_window_finder.h"
#include "ash/common/wm/window_state.h"
#include "ash/common/wm/wm_window_animations.h"
+#include "ash/common/wm/workspace/workspace_event_handler.h"
#include "ash/common/wm/workspace/workspace_layout_manager.h"
#include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h"
#include "ash/common/wm_root_window_controller.h"
+#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
-#include "ash/wm/workspace/workspace_event_handler.h"
#include "base/memory/ptr_util.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
@@ -41,16 +42,14 @@ const int kInitialAnimationDurationMS = 200;
WorkspaceController::WorkspaceController(WmWindow* viewport)
: viewport_(viewport),
- event_handler_(new WorkspaceEventHandler),
+ event_handler_(WmShell::Get()->CreateWorkspaceEventHandler(viewport)),
layout_manager_(new WorkspaceLayoutManager(viewport)) {
viewport_->SetVisibilityAnimationTransition(::wm::ANIMATE_NONE);
viewport_->SetLayoutManager(base::WrapUnique(layout_manager_));
- viewport_->AddLimitedPreTargetHandler(event_handler_.get());
}
WorkspaceController::~WorkspaceController() {
viewport_->SetLayoutManager(nullptr);
- viewport_->RemoveLimitedPreTargetHandler(event_handler_.get());
}
wm::WorkspaceWindowState WorkspaceController::GetWindowState() const {
« no previous file with comments | « ash/wm/workspace/workspace_event_handler_unittest.cc ('k') | ash/wm/workspace_controller_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698