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

Side by Side Diff: ui/views/corewm/cursor_height_provider_win.cc

Issue 1543173002: Switch to standard integer types in ui/views/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/corewm/cursor_height_provider_win.h" 5 #include "ui/views/corewm/cursor_height_provider_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <stddef.h>
9 #include <stdint.h>
8 #include <algorithm> 10 #include <algorithm>
9 #include <map> 11 #include <map>
10 12
11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/win/scoped_hdc.h" 14 #include "base/win/scoped_hdc.h"
14 15
15 namespace { 16 namespace {
16 using PixelData = scoped_ptr<uint32_t[]>; 17 using PixelData = scoped_ptr<uint32_t[]>;
17 using HeightStorage = std::map<HCURSOR, int>; 18 using HeightStorage = std::map<HCURSOR, int>;
18 19
19 const uint32_t kBitsPeruint32 = sizeof(uint32_t) * 8; 20 const uint32_t kBitsPeruint32 = sizeof(uint32_t) * 8;
20 // All bits are 1 for transparent portion of monochromatic mask. 21 // All bits are 1 for transparent portion of monochromatic mask.
21 const uint32_t kTransparentMask = 0xffffffff; 22 const uint32_t kTransparentMask = 0xffffffff;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return cached_height->second; 168 return cached_height->second;
168 169
169 const int height = CalculateCursorHeight(cursor.hCursor); 170 const int height = CalculateCursorHeight(cursor.hCursor);
170 (*cached_heights)[cursor.hCursor] = height; 171 (*cached_heights)[cursor.hCursor] = height;
171 172
172 return height; 173 return height;
173 } 174 }
174 175
175 } // namespace corewm 176 } // namespace corewm
176 } // namespace views 177 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698