diff options
author | stanguturi@google.com <stanguturi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-29 21:45:28 +0000 |
---|---|---|
committer | stanguturi@google.com <stanguturi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-29 21:45:28 +0000 |
commit | e2504894ed0be1acaf8f6d753f752d25cc3f9aed (patch) | |
tree | abdada821f90b3d89bdf57756bf6f26c27ce798f /chrome/views/tooltip_manager.h | |
parent | 7523f124f2b43f681b94b8d69d1e61daed806287 (diff) | |
download | chromium_src-e2504894ed0be1acaf8f6d753f752d25cc3f9aed.zip chromium_src-e2504894ed0be1acaf8f6d753f752d25cc3f9aed.tar.gz chromium_src-e2504894ed0be1acaf8f6d753f752d25cc3f9aed.tar.bz2 |
Made changes to display the tooltip window when user navigates through the icons in the toolbar using keyboard arrow keys.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/tooltip_manager.h')
-rw-r--r-- | chrome/views/tooltip_manager.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/chrome/views/tooltip_manager.h b/chrome/views/tooltip_manager.h index 9c77f91..c229b52 100644 --- a/chrome/views/tooltip_manager.h +++ b/chrome/views/tooltip_manager.h @@ -92,6 +92,12 @@ class TooltipManager { // Invoked when the tooltip text changes for the specified views. void TooltipTextChanged(View* view); + // Invoked when toolbar icon gets focus. + void ShowKeyboardTooltip(View* view); + + // Invoked when toolbar loses focus. + void HideKeyboardTooltip(); + // Message handlers. These forward to the tooltip control. virtual void OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param); LRESULT OnNotify(int w_param, NMHDR* l_param, bool* handled); @@ -132,7 +138,13 @@ class TooltipManager { // of text in the tooltip. void TrimTooltipToFit(std::wstring* text, int* width, - int* line_count); + int* line_count, + int position_x, + int position_y, + HWND window); + + // Invoked when the timer elapses and tooltip has to be destroyed. + void DestroyKeyboardTooltipWindow(HWND window_to_destroy); // Hosting view container. ViewContainer* view_container_; @@ -161,6 +173,13 @@ class TooltipManager { // Height for a tooltip; lazily calculated. static int tooltip_height_; + // control window for tooltip displayed using keyboard. + HWND keyboard_tooltip_hwnd_; + + // Used to register DestroyTooltipWindow function with postdelayedtask + // function. + ScopedRunnableMethodFactory<TooltipManager> keyboard_tooltip_factory_; + DISALLOW_EVIL_CONSTRUCTORS(TooltipManager); }; |