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

Side by Side Diff: ui/views/corewm/tooltip_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, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef UI_VIEWS_COREWM_TOOLTIP_WIN_H_ 5 #ifndef UI_VIEWS_COREWM_TOOLTIP_WIN_H_
6 #define UI_VIEWS_COREWM_TOOLTIP_WIN_H_ 6 #define UI_VIEWS_COREWM_TOOLTIP_WIN_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "ui/gfx/point.h" 11 #include "ui/gfx/point.h"
12 #include "ui/views/corewm/cursor_height_provider_win.h"
12 #include "ui/views/corewm/tooltip.h" 13 #include "ui/views/corewm/tooltip.h"
13 14
14 #include <windows.h> 15 #include <windows.h>
15 #include <commctrl.h> 16 #include <commctrl.h>
16 17
17 namespace views { 18 namespace views {
18 namespace corewm { 19 namespace corewm {
19 20
20 // Implementation of Tooltip that uses the native win32 control for showing the 21 // Implementation of Tooltip that uses the native win32 control for showing the
21 // tooltip. 22 // tooltip.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 TOOLINFO toolinfo_; 55 TOOLINFO toolinfo_;
55 56
56 // Is the tooltip showing? 57 // Is the tooltip showing?
57 bool showing_; 58 bool showing_;
58 59
59 // Location to show the tooltip at. In order to position the tooltip we need 60 // Location to show the tooltip at. In order to position the tooltip we need
60 // to know the size. The size is only available from TTN_SHOW, so we have to 61 // to know the size. The size is only available from TTN_SHOW, so we have to
61 // cache it. 62 // cache it.
62 gfx::Point location_; 63 gfx::Point location_;
63 64
65 CursorHeightProvider cursor_height_provider_;
66
64 DISALLOW_COPY_AND_ASSIGN(TooltipWin); 67 DISALLOW_COPY_AND_ASSIGN(TooltipWin);
65 }; 68 };
66 69
67 } // namespace corewm 70 } // namespace corewm
68 } // namespace views 71 } // namespace views
69 72
70 #endif // UI_VIEWS_COREWM_TOOLTIP_WIN_H_ 73 #endif // UI_VIEWS_COREWM_TOOLTIP_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698