Commit 4c69af2b authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Remove SetCursorForWindow

This was added for WS, but no longer used.

Bug: None
Change-Id: I02704c8bf7c968a42c79a86191396e998c42662b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1783361
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693182}
parent 81f5fed2
......@@ -80,28 +80,6 @@ void CompoundEventFilter::RemoveHandler(ui::EventHandler* handler) {
handlers_.RemoveObserver(handler);
}
void CompoundEventFilter::SetCursorForWindow(aura::Window* window,
const ui::Cursor& cursor) {
if (last_window_that_provided_cursor_.windows().empty())
return;
aura::Window* last_window = last_window_that_provided_cursor_.windows()[0];
// Determine if the window hierarchies match, i.e. if |window| is an ancestor
// or descendent of |last_window_that_provided_cursor_|.
if (!window->Contains(last_window) && !last_window->Contains(window))
return;
aura::Window* root_window = window->GetRootWindow();
if (!root_window)
return;
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(root_window);
if (cursor_client)
cursor_client->SetCursor(cursor);
}
////////////////////////////////////////////////////////////////////////////////
// CompoundEventFilter, private:
......@@ -115,9 +93,6 @@ void CompoundEventFilter::UpdateCursor(aura::Window* target,
if (drag_drop_client && drag_drop_client->IsDragDropInProgress())
return;
last_window_that_provided_cursor_.RemoveAll();
last_window_that_provided_cursor_.Add(target);
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(root_window);
if (cursor_client) {
......
......@@ -8,7 +8,6 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/observer_list.h"
#include "ui/aura/window_tracker.h"
#include "ui/events/event.h"
#include "ui/events/event_handler.h"
#include "ui/gfx/native_widget_types.h"
......@@ -48,13 +47,6 @@ class WM_CORE_EXPORT CompoundEventFilter : public ui::EventHandler {
void AddHandler(ui::EventHandler* filter);
void RemoveHandler(ui::EventHandler* filter);
// If |window| is part of the same window hierarchy as the last window to have
// provided the cursor (i.e. for which UpdateCursor was called), updates the
// cursor manager with |cursor|. Otherwise, this call does nothing. This means
// calling SetCursorForWindow on an arbitrary window that the pointer is not
// over will do nothing.
void SetCursorForWindow(aura::Window* window, const ui::Cursor& cursor);
private:
// Updates the cursor if the target provides a custom one, and provides
// default resize cursors for window edges.
......@@ -85,9 +77,6 @@ class WM_CORE_EXPORT CompoundEventFilter : public ui::EventHandler {
// Additional pre-target event handlers.
base::ObserverList<ui::EventHandler, true>::Unchecked handlers_;
// Holds the last window that was used to update CursorClient in UpdateCursor.
aura::WindowTracker last_window_that_provided_cursor_;
DISALLOW_COPY_AND_ASSIGN(CompoundEventFilter);
};
......
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