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

Side by Side Diff: ui/aura/root_window_host_win.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_host_win.h" 5 #include "ui/aura/root_window_host_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "ui/aura/root_window.h" 12 #include "ui/aura/root_window.h"
13 #include "ui/aura/env.h" 13 #include "ui/aura/env.h"
14 #include "ui/aura/event.h" 14 #include "ui/aura/event.h"
15 15
16 using std::max; 16 using std::max;
17 using std::min; 17 using std::min;
18 18
19 namespace aura { 19 namespace aura {
20 20
21 namespace { 21 namespace {
22 22
23 const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) { 23 const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) {
24 switch (native_cursor) { 24 switch (native_cursor.native_type()) {
25 case kCursorNull: 25 case kCursorNull:
26 return IDC_ARROW; 26 return IDC_ARROW;
27 case kCursorPointer: 27 case kCursorPointer:
28 return IDC_ARROW; 28 return IDC_ARROW;
29 case kCursorCross: 29 case kCursorCross:
30 return IDC_CROSS; 30 return IDC_CROSS;
31 case kCursorHand: 31 case kCursorHand:
32 return IDC_HAND; 32 return IDC_HAND;
33 case kCursorIBeam: 33 case kCursorIBeam:
34 return IDC_IBEAM; 34 return IDC_IBEAM;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 310 }
311 311
312 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { 312 void RootWindowHostWin::OnSize(UINT param, const CSize& size) {
313 // Minimizing resizes the window to 0x0 which causes our layout to go all 313 // Minimizing resizes the window to 0x0 which causes our layout to go all
314 // screwy, so we just ignore it. 314 // screwy, so we just ignore it.
315 if (param != SIZE_MINIMIZED) 315 if (param != SIZE_MINIMIZED)
316 root_window_->OnHostResized(gfx::Size(size.cx, size.cy)); 316 root_window_->OnHostResized(gfx::Size(size.cx, size.cy));
317 } 317 }
318 318
319 } // namespace aura 319 } // namespace aura
OLDNEW
« ui/aura/cursor.h ('K') | « ui/aura/root_window_host_linux.cc ('k') | ui/base/x/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698