diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-29 20:30:12 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-29 20:30:12 +0000 |
commit | 8676f04721b1a08e3ac16b3d33737e7d8706b402 (patch) | |
tree | da7af576aae72bb1ea3a662ba07544bbac1df5b4 /ash/status_area/status_area_view.cc | |
parent | 72a22eb913ab85b47971038acc7ca7117a96d633 (diff) | |
download | chromium_src-8676f04721b1a08e3ac16b3d33737e7d8706b402.zip chromium_src-8676f04721b1a08e3ac16b3d33737e7d8706b402.tar.gz chromium_src-8676f04721b1a08e3ac16b3d33737e7d8706b402.tar.bz2 |
Makes the shelf visible if the launcher/status has focus.
BUG=120706
TEST=see bug, also covered by unit tests
R=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9890001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129679 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/status_area/status_area_view.cc')
-rw-r--r-- | ash/status_area/status_area_view.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ash/status_area/status_area_view.cc b/ash/status_area/status_area_view.cc index 472a6f4..53ae934 100644 --- a/ash/status_area/status_area_view.cc +++ b/ash/status_area/status_area_view.cc @@ -14,6 +14,7 @@ #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/canvas.h" #include "ui/gfx/image/image.h" +#include "ui/views/accessible_pane_view.h" #include "ui/views/widget/widget.h" namespace ash { @@ -77,8 +78,16 @@ ASH_EXPORT views::Widget* CreateStatusArea(views::View* contents) { ash::internal::kShellWindowId_StatusContainer); params.transparent = true; widget->Init(params); + // TODO(sky): We need the contents to be an AccessiblePaneView for + // FocusCycler. SystemTray isn't an AccessiblePaneView, so we wrap it in + // one. This is a bit of a hack, but at this point this code path is only used + // for tests. Once the migration to SystemTray is done this method should no + // longer be needed and we can nuke this. + views::AccessiblePaneView* accessible_pane = + new views::AccessiblePaneView; + accessible_pane->AddChildView(contents); widget->set_focus_on_creation(false); - widget->SetContentsView(contents); + widget->SetContentsView(accessible_pane); widget->Show(); widget->GetNativeView()->SetName("StatusAreaView"); return widget; |