Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_VIEWS_COREWM_CURSOR_HEIGHT_PROVIDER_WIN_H_ | |
| 6 #define UI_VIEWS_COREWM_CURSOR_HEIGHT_PROVIDER_WIN_H_ | |
| 7 | |
| 8 #include <windows.h> | |
| 9 #include <map> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 | |
| 13 namespace views { | |
| 14 namespace corewm { | |
| 15 | |
| 16 /** | |
|
sky
2014/04/30 17:22:14
This isn't Java;) Use // for comments ( http://goo
| |
| 17 * Provides the information about height of visible mouse cursor. | |
| 18 */ | |
| 19 class CursorHeightProvider { | |
| 20 public: | |
| 21 CursorHeightProvider() {} | |
| 22 | |
| 23 /** | |
| 24 * Gets the visible height of current cursor. | |
| 25 * | |
| 26 * The height is offset between cursor's hot point and it's | |
| 27 * bottom edge, derived from first non-transparent row of cursor's mask. | |
| 28 */ | |
| 29 int GetCursorHeight(); | |
|
sky
2014/04/30 17:22:14
GetCurrentCursorHeight()
| |
| 30 | |
| 31 private: | |
| 32 typedef std::map<HCURSOR, int> HeightStorage; | |
| 33 | |
| 34 HeightStorage cached_heights_; | |
|
sky
2014/04/30 17:22:14
Shouldn't this be shared among instances? In fact
Mateusz Szymański
2014/05/05 07:34:46
Come to think about it it should have been a funct
| |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(CursorHeightProvider); | |
| 37 }; | |
| 38 | |
| 39 } // namespace corewm | |
| 40 } // namespace views | |
| 41 | |
| 42 #endif // UI_VIEWS_COREWM_CURSOR_HEIGHT_PROVIDER_WIN_H_ | |
| OLD | NEW |