Commit bf470281 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Skip cursor client operation in mash.

BUG=833456
TEST=none

Change-Id: I9d01f94670a406ea7b30b4c232775dc76ad4a48c
Reviewed-on: https://chromium-review.googlesource.com/1013272
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarDavid Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551282}
parent 3b0840b3
......@@ -88,7 +88,11 @@ Pointer::Pointer(PointerDelegate* delegate)
auto* helper = WMHelper::GetInstance();
helper->AddPreTargetHandler(this);
helper->AddDisplayConfigurationObserver(this);
helper->GetCursorClient()->AddObserver(this);
// TODO(sky): CursorClient does not exist in mash
// yet. https://crbug.com/631103.
aura::client::CursorClient* cursor_client = helper->GetCursorClient();
if (cursor_client)
cursor_client->AddObserver(this);
}
Pointer::~Pointer() {
......@@ -101,7 +105,11 @@ Pointer::~Pointer() {
auto* helper = WMHelper::GetInstance();
helper->RemoveDisplayConfigurationObserver(this);
helper->RemovePreTargetHandler(this);
helper->GetCursorClient()->RemoveObserver(this);
// TODO(sky): CursorClient does not exist in mash
// yet. https://crbug.com/631103.
aura::client::CursorClient* cursor_client = helper->GetCursorClient();
if (cursor_client)
cursor_client->RemoveObserver(this);
if (root_surface())
root_surface()->RemoveSurfaceObserver(this);
}
......
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