Commit 3af7b2a2 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

chromeos: makes MoveEventHandler --mash specific

It's not applicable to ws2 (because the pre-target handlers installed by
ash take care of it).

BUG=842295
TEST=none

Change-Id: I57ae1c684580233233bff13186560c2790f56c79
Reviewed-on: https://chromium-review.googlesource.com/1088128Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564888}
parent 70ee9aa7
...@@ -116,7 +116,6 @@ WorkspaceEventHandlerMash* MoveEventHandler::GetWorkspaceEventHandlerMash() { ...@@ -116,7 +116,6 @@ WorkspaceEventHandlerMash* MoveEventHandler::GetWorkspaceEventHandlerMash() {
void MoveEventHandler::OnMouseEvent(ui::MouseEvent* event) { void MoveEventHandler::OnMouseEvent(ui::MouseEvent* event) {
toplevel_window_event_handler_.OnMouseEvent(event, window_); toplevel_window_event_handler_.OnMouseEvent(event, window_);
// TODO(crbug.com/842295): Add support for window-service as a library.
if (!toplevel_window_event_handler_.is_drag_in_progress() && if (!toplevel_window_event_handler_.is_drag_in_progress() &&
window_manager_client_ && window_manager_client_ &&
(event->type() == ui::ET_POINTER_MOVED || (event->type() == ui::ET_POINTER_MOVED ||
......
...@@ -191,8 +191,10 @@ class WmNativeWidgetAura : public views::NativeWidgetAura { ...@@ -191,8 +191,10 @@ class WmNativeWidgetAura : public views::NativeWidgetAura {
// views::NativeWidgetAura: // views::NativeWidgetAura:
views::NonClientFrameView* CreateNonClientFrameView() override { views::NonClientFrameView* CreateNonClientFrameView() override {
move_event_handler_ = std::make_unique<MoveEventHandler>( if (window_manager_client_) {
window_manager_client_, GetNativeView()); move_event_handler_ = std::make_unique<MoveEventHandler>(
window_manager_client_, GetNativeView());
}
// TODO(sky): investigate why we have this. Seems this should be the same // TODO(sky): investigate why we have this. Seems this should be the same
// as not specifying client area insets. // as not specifying client area insets.
if (remove_standard_frame_) if (remove_standard_frame_)
...@@ -225,6 +227,8 @@ class WmNativeWidgetAura : public views::NativeWidgetAura { ...@@ -225,6 +227,8 @@ class WmNativeWidgetAura : public views::NativeWidgetAura {
const bool enable_immersive_; const bool enable_immersive_;
const mojom::WindowStyle window_style_; const mojom::WindowStyle window_style_;
// TODO: this is no longer necessary once --mash is removed,
// https://crbug.com/842365.
std::unique_ptr<MoveEventHandler> move_event_handler_; std::unique_ptr<MoveEventHandler> move_event_handler_;
aura::WindowManagerClient* window_manager_client_; aura::WindowManagerClient* window_manager_client_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment