diff options
author | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-01 21:21:11 +0000 |
---|---|---|
committer | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-01 21:21:11 +0000 |
commit | 4a229e90405f2c1d97409343f2c274f384284353 (patch) | |
tree | e98220c0de513a06c72207ca12dadcd3689f641c /ui/aura/client | |
parent | 084262c6432c7f673f8342326e144660b40cb7d7 (diff) | |
download | chromium_src-4a229e90405f2c1d97409343f2c274f384284353.zip chromium_src-4a229e90405f2c1d97409343f2c274f384284353.tar.gz chromium_src-4a229e90405f2c1d97409343f2c274f384284353.tar.bz2 |
Reland change for aura tooltips that was revert due to build break:
http://codereview.chromium.org/8747022
BUG=97249
TEST=none
Review URL: http://codereview.chromium.org/8769011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112535 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/client')
-rw-r--r-- | ui/aura/client/aura_constants.cc | 1 | ||||
-rw-r--r-- | ui/aura/client/aura_constants.h | 4 | ||||
-rw-r--r-- | ui/aura/client/tooltip_client.h | 32 |
3 files changed, 37 insertions, 0 deletions
diff --git a/ui/aura/client/aura_constants.cc b/ui/aura/client/aura_constants.cc index f0a651a..e23b7a0 100644 --- a/ui/aura/client/aura_constants.cc +++ b/ui/aura/client/aura_constants.cc @@ -14,5 +14,6 @@ const char kModalKey[] = "Modal"; const char kShadowTypeKey[] = "ShadowType"; const char kDesktopDragDropClientKey[] = "DesktopDragDropClient"; const char kDragDropDelegateKey[] = "DragDropDelegate"; +const char kDesktopTooltipClientKey[] = "DesktopTooltipClient"; } // namespace aura diff --git a/ui/aura/client/aura_constants.h b/ui/aura/client/aura_constants.h index 363c420..dbc321d 100644 --- a/ui/aura/client/aura_constants.h +++ b/ui/aura/client/aura_constants.h @@ -40,6 +40,10 @@ AURA_EXPORT extern const char kDesktopDragDropClientKey[]; // A property key to store the drag and drop delegate for a window. The type of // the value is |aura::WindowDragDropDelegate*|. AURA_EXPORT extern const char kDragDropDelegateKey[]; + +// A property key to store the tooltip client for the desktop. The type of +// the value is |aura::TooltipClient*|. +AURA_EXPORT extern const char kDesktopTooltipClientKey[]; } // namespace aura #endif // UI_AURA_CLIENT_AURA_CONSTANTS_H_ diff --git a/ui/aura/client/tooltip_client.h b/ui/aura/client/tooltip_client.h new file mode 100644 index 0000000..eb6db2c --- /dev/null +++ b/ui/aura/client/tooltip_client.h @@ -0,0 +1,32 @@ +// Copyright (c) 2011 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_AURA_CLIENT_TOOLTIP_CLIENT_H_ +#define UI_AURA_CLIENT_TOOLTIP_CLIENT_H_ +#pragma once + +#include "ui/aura/aura_export.h" +#include "ui/aura/event.h" +#include "ui/gfx/font.h" + +namespace aura { + +class Window; + +class AURA_EXPORT TooltipClient { + public: + // Returns the default font used by tooltips. + static gfx::Font GetDefaultFont(); + + // Returns the maximum width of the tooltip. |x| and |y| give the location + // the tooltip is to be displayed on in screen coordinates. + static int GetMaxWidth(int x, int y); + + // Informs the shell tooltip manager of change in tooltip for window |target|. + virtual void UpdateTooltip(Window* target) = 0; +}; + +} // namespace aura + +#endif // UI_AURA_CLIENT_TOOLTIP_CLIENT_H_ |