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

Unified Diff: ui/views/corewm/cursor_height_provider_win.h

Issue 225403022: Fixed positioning of tooltips in multi monitor setups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unhardcoded cursor size hence simplifying DIP to screen conversions Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/corewm/cursor_height_provider_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « no previous file | ui/views/corewm/cursor_height_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698