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

Unified Diff: ui/views/controls/native/native_view_host_aura.cc

Issue 211733003: Move GetCursor() method from WindowDelegate to its own delegate interface CursorDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 | « ui/keyboard/keyboard_controller.cc ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/native/native_view_host_aura.cc
diff --git a/ui/views/controls/native/native_view_host_aura.cc b/ui/views/controls/native/native_view_host_aura.cc
index 49bf733bbe2ae06567f1b9d148db2255b743ab85..edd65a61d34c64b60ba93a7630bc147bb88986ae 100644
--- a/ui/views/controls/native/native_view_host_aura.cc
+++ b/ui/views/controls/native/native_view_host_aura.cc
@@ -11,6 +11,7 @@
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/view_constants_aura.h"
#include "ui/views/widget/widget.h"
+#include "ui/wm/public/cursor_delegate.h"
namespace views {
@@ -102,8 +103,11 @@ gfx::NativeViewAccessible NativeViewHostAura::GetNativeViewAccessible() {
}
gfx::NativeCursor NativeViewHostAura::GetCursor(int x, int y) {
- if (host_->native_view())
- return host_->native_view()->GetCursor(gfx::Point(x, y));
+ if (host_->native_view()) {
+ wm::CursorDelegate* delegate = wm::GetCursorDelegate(host_->native_view());
+ if (delegate)
+ return delegate->GetCursorForPoint(gfx::Point(x, y));
+ }
return gfx::kNullCursor;
}
« no previous file with comments | « ui/keyboard/keyboard_controller.cc ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698