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

Side by Side Diff: ui/base/cursor/cursor_loader_win.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 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 unified diff | Download patch
« no previous file with comments | « ui/base/clipboard/clipboard.cc ('k') | ui/base/l10n/formatter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 "ui/base/cursor/cursor.h" 9 #include "ui/base/cursor/cursor.h"
10 #include "ui/resources/grit/ui_unscaled_resources.h" 10 #include "ui/resources/grit/ui_unscaled_resources.h"
11 11
12 namespace ui { 12 namespace ui {
13 13
14 namespace { 14 namespace {
15 15
16 base::LazyInstance<base::string16> g_cursor_resource_module_name; 16 base::LazyInstance<base::string16>::DestructorAtExit
17 g_cursor_resource_module_name;
17 18
18 const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) { 19 const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) {
19 switch (native_cursor.native_type()) { 20 switch (native_cursor.native_type()) {
20 case kCursorNull: 21 case kCursorNull:
21 return IDC_ARROW; 22 return IDC_ARROW;
22 case kCursorPointer: 23 case kCursorPointer:
23 return IDC_ARROW; 24 return IDC_ARROW;
24 case kCursorCross: 25 case kCursorCross:
25 return IDC_CROSS; 26 return IDC_CROSS;
26 case kCursorHand: 27 case kCursorHand:
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 160 }
160 } 161 }
161 162
162 // static 163 // static
163 void CursorLoaderWin::SetCursorResourceModule( 164 void CursorLoaderWin::SetCursorResourceModule(
164 const base::string16& module_name) { 165 const base::string16& module_name) {
165 g_cursor_resource_module_name.Get() = module_name; 166 g_cursor_resource_module_name.Get() = module_name;
166 } 167 }
167 168
168 } // namespace ui 169 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard.cc ('k') | ui/base/l10n/formatter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698