| OLD | NEW |
| 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/tooltip.h" | 12 #include "ui/views/corewm/tooltip.h" |
| 13 | 13 |
| 14 #include <windows.h> | 14 #include <windows.h> |
| 15 #include <commctrl.h> | 15 #include <commctrl.h> |
| 16 | 16 |
| 17 namespace views { | 17 namespace views { |
| 18 namespace corewm { | 18 namespace corewm { |
| 19 | 19 |
| 20 // Implementation of Tooltip that uses the native win32 control for showing the | 20 // Implementation of Tooltip that uses the native win32 control for showing the |
| 21 // tooltip. | 21 // tooltip. |
| 22 class VIEWS_EXPORT TooltipWin : public Tooltip { | 22 class VIEWS_EXPORT TooltipWin : public Tooltip { |
| 23 public: | 23 public: |
| 24 explicit TooltipWin(HWND parent); | 24 explicit TooltipWin(HWND parent); |
| 25 virtual ~TooltipWin(); | 25 virtual ~TooltipWin(); |
| 26 | 26 |
| 27 // HandleNotify() is forwarded from DesktopWindowTreeHostWin to keep the | 27 // HandleNotify() is forwarded from DesktopRootWindowHostWin to keep the |
| 28 // native tooltip in sync. | 28 // native tooltip in sync. |
| 29 bool HandleNotify(int w_param, NMHDR* l_param, LRESULT* l_result); | 29 bool HandleNotify(int w_param, NMHDR* l_param, LRESULT* l_result); |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 // Ensures |tooltip_hwnd_| is valid. Returns true if valid, false if there | 32 // Ensures |tooltip_hwnd_| is valid. Returns true if valid, false if there |
| 33 // a problem creating |tooltip_hwnd_|. | 33 // a problem creating |tooltip_hwnd_|. |
| 34 bool EnsureTooltipWindow(); | 34 bool EnsureTooltipWindow(); |
| 35 | 35 |
| 36 // Sets the position of the tooltip. | 36 // Sets the position of the tooltip. |
| 37 void PositionTooltip(); | 37 void PositionTooltip(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 61 // cache it. | 61 // cache it. |
| 62 gfx::Point location_; | 62 gfx::Point location_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(TooltipWin); | 64 DISALLOW_COPY_AND_ASSIGN(TooltipWin); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace corewm | 67 } // namespace corewm |
| 68 } // namespace views | 68 } // namespace views |
| 69 | 69 |
| 70 #endif // UI_VIEWS_COREWM_TOOLTIP_WIN_H_ | 70 #endif // UI_VIEWS_COREWM_TOOLTIP_WIN_H_ |
| OLD | NEW |