OLD | NEW |
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/base/cursor/cursor_loader_win.h" | 5 #include "ui/base/cursor/cursor_loader_win.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "grit/ui_unscaled_resources.h" | 9 #include "grit/ui_unscaled_resources.h" |
10 | 10 |
11 #if defined(USE_AURA) | 11 #if defined(USE_AURA) |
12 #include "ui/base/cursor/cursor.h" | 12 #include "ui/base/cursor/cursor.h" |
13 #endif | 13 #endif |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 #if defined(USE_AURA) | 17 #if defined(USE_AURA) |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 base::LazyInstance<string16> g_cursor_resource_module_name; | 21 base::LazyInstance<base::string16> g_cursor_resource_module_name; |
22 | 22 |
23 const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) { | 23 const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) { |
24 switch (native_cursor.native_type()) { | 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: |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 cursor_id); | 163 cursor_id); |
164 } | 164 } |
165 cursor->SetPlatformCursor(platform_cursor); | 165 cursor->SetPlatformCursor(platform_cursor); |
166 } | 166 } |
167 } | 167 } |
168 #endif | 168 #endif |
169 } | 169 } |
170 | 170 |
171 #if defined(USE_AURA) | 171 #if defined(USE_AURA) |
172 // static | 172 // static |
173 void CursorLoaderWin::SetCursorResourceModule(const string16& module_name) { | 173 void CursorLoaderWin::SetCursorResourceModule( |
| 174 const base::string16& module_name) { |
174 g_cursor_resource_module_name.Get() = module_name; | 175 g_cursor_resource_module_name.Get() = module_name; |
175 } | 176 } |
176 #endif | 177 #endif |
177 | 178 |
178 } // namespace ui | 179 } // namespace ui |
OLD | NEW |