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

Side by Side Diff: ui/aura/root_window.cc

Issue 9463003: aura-x11: Add custom web cursor support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 return rect.size(); 114 return rect.size();
115 } 115 }
116 116
117 void RootWindow::SetCursor(gfx::NativeCursor cursor) { 117 void RootWindow::SetCursor(gfx::NativeCursor cursor) {
118 last_cursor_ = cursor; 118 last_cursor_ = cursor;
119 // A lot of code seems to depend on NULL cursors actually showing an arrow, 119 // A lot of code seems to depend on NULL cursors actually showing an arrow,
120 // so just pass everything along to the host. 120 // so just pass everything along to the host.
121 host_->SetCursor(cursor); 121 host_->SetCursor(cursor);
122 } 122 }
123 123
124 void RootWindow::SetCustomCursor(const gfx::PlatformCursor& cursor) {
125 host_->SetCustomCursor(cursor);
126 }
127
124 void RootWindow::ShowCursor(bool show) { 128 void RootWindow::ShowCursor(bool show) {
125 cursor_shown_ = show; 129 cursor_shown_ = show;
126 host_->ShowCursor(show); 130 host_->ShowCursor(show);
127 } 131 }
128 132
129 void RootWindow::MoveCursorTo(const gfx::Point& location) { 133 void RootWindow::MoveCursorTo(const gfx::Point& location) {
130 host_->MoveCursorTo(location); 134 host_->MoveCursorTo(location);
131 } 135 }
132 136
133 bool RootWindow::ConfineCursorToWindow() { 137 bool RootWindow::ConfineCursorToWindow() {
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 // is currently broken. See/ crbug.com/107931. 820 // is currently broken. See/ crbug.com/107931.
817 MouseEvent event(ui::ET_MOUSE_MOVED, 821 MouseEvent event(ui::ET_MOUSE_MOVED,
818 orig_mouse_location, 822 orig_mouse_location,
819 orig_mouse_location, 823 orig_mouse_location,
820 0); 824 0);
821 DispatchMouseEvent(&event); 825 DispatchMouseEvent(&event);
822 #endif 826 #endif
823 } 827 }
824 828
825 } // namespace aura 829 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698