Chromium Code Reviews| Index: ui/views/corewm/cursor_height_provider_win.h |
| diff --git a/ui/views/corewm/cursor_height_provider_win.h b/ui/views/corewm/cursor_height_provider_win.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..25ba51c185ea6070d893b5878b6add596ce25140 |
| --- /dev/null |
| +++ b/ui/views/corewm/cursor_height_provider_win.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_VIEWS_COREWM_CURSOR_HEIGHT_PROVIDER_WIN_H_ |
| +#define UI_VIEWS_COREWM_CURSOR_HEIGHT_PROVIDER_WIN_H_ |
| + |
| +#include <windows.h> |
| +#include <map> |
| + |
| +#include "base/macros.h" |
| + |
| +namespace views { |
| +namespace corewm { |
| + |
| +/** |
|
sky
2014/04/30 17:22:14
This isn't Java;) Use // for comments ( http://goo
|
| + * Provides the information about height of visible mouse cursor. |
| + */ |
| +class CursorHeightProvider { |
| + public: |
| + CursorHeightProvider() {} |
| + |
| + /** |
| + * Gets the visible height of current cursor. |
| + * |
| + * The height is offset between cursor's hot point and it's |
| + * bottom edge, derived from first non-transparent row of cursor's mask. |
| + */ |
| + int GetCursorHeight(); |
|
sky
2014/04/30 17:22:14
GetCurrentCursorHeight()
|
| + |
| + private: |
| + typedef std::map<HCURSOR, int> HeightStorage; |
| + |
| + 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
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(CursorHeightProvider); |
| +}; |
| + |
| +} // namespace corewm |
| +} // namespace views |
| + |
| +#endif // UI_VIEWS_COREWM_CURSOR_HEIGHT_PROVIDER_WIN_H_ |