diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 21:23:56 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 21:23:56 +0000 |
commit | 7f6e56001fa0dcf2ec03b7264b238401319e5371 (patch) | |
tree | a2edb305c247e068dac6a778c5be46f2e67ff255 /ash/tooltips | |
parent | 893a65620be4a25bc6a3e533bb2bfa17ce07697d (diff) | |
download | chromium_src-7f6e56001fa0dcf2ec03b7264b238401319e5371.zip chromium_src-7f6e56001fa0dcf2ec03b7264b238401319e5371.tar.gz chromium_src-7f6e56001fa0dcf2ec03b7264b238401319e5371.tar.bz2 |
Fix tooltips in ash.
ash::internal::TooltipController was conditionally setting InitParams::parent,
which was putting tooltips in the wrong part of the ash hierarchy on some
platforms, while on others, there was no contextual information. Pass
InitParams::context on all platforms instead; this is what context is for.
BUG=151718, 161882
Review URL: https://chromiumcodereview.appspot.com/11516007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/tooltips')
-rw-r--r-- | ash/tooltips/tooltip_controller.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ash/tooltips/tooltip_controller.cc b/ash/tooltips/tooltip_controller.cc index 255366a..1639419dd 100644 --- a/ash/tooltips/tooltip_controller.cc +++ b/ash/tooltips/tooltip_controller.cc @@ -83,12 +83,8 @@ views::Widget* CreateTooltip(const gfx::Point location) { // For aura, since we set the type to TOOLTIP_TYPE, the widget will get // auto-parented to the MenuAndTooltipsContainer. params.type = views::Widget::InitParams::TYPE_TOOLTIP; -#if !defined(OS_CHROMEOS) - // We need to pass the right root window so that the views delegate - // can create the right type of widget. - params.parent = ash::wm::GetRootWindowAt(location); - DCHECK(params.parent); -#endif + params.context = ash::wm::GetRootWindowAt(location); + DCHECK(params.context); params.keep_on_top = true; params.accept_events = false; widget->Init(params); |