| Index: chrome/browser/ui/views/frame/browser_view.cc
|
| diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
|
| index 3ae89ba94378e08744c20600fae131a099bb738c..96da5c19fdbc51765376b4d54501661c78a2ff76 100644
|
| --- a/chrome/browser/ui/views/frame/browser_view.cc
|
| +++ b/chrome/browser/ui/views/frame/browser_view.cc
|
| @@ -109,6 +109,7 @@
|
| #include "ash/launcher/launcher.h"
|
| #include "ash/launcher/launcher_model.h"
|
| #include "ash/shell.h"
|
| +#include "chrome/browser/chromeos/status/status_area_view.h"
|
| #include "chrome/browser/ui/views/accelerator_table.h"
|
| #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
|
| #include "chrome/browser/ui/views/aura/launcher_icon_updater.h"
|
| @@ -964,9 +965,11 @@ void BrowserView::RotatePaneFocus(bool forwards) {
|
|
|
| std::vector<views::View*> accessible_views(
|
| accessible_panes.begin(), accessible_panes.end());
|
| +
|
| accessible_views.push_back(GetTabContentsContainerView());
|
| if (devtools_container_->visible())
|
| accessible_views.push_back(devtools_container_->GetFocusView());
|
| +
|
| int count = static_cast<int>(accessible_views.size());
|
|
|
| // Figure out which view (if any) currently has the focus.
|
| @@ -987,6 +990,21 @@ void BrowserView::RotatePaneFocus(bool forwards) {
|
| if (focused_view && index >= pane_count)
|
| GetFocusManager()->StoreFocusedView();
|
|
|
| + // Add the special panes to the rotation.
|
| + int normal_count = count;
|
| +
|
| +#if defined(OS_CHROMEOS) && defined(USE_AURA)
|
| + int status_area_index = count;
|
| + ++count;
|
| +
|
| + int launcher_index = -1;
|
| + if (!ash::Shell::GetInstance()->IsWindowModeCompact()) {
|
| + // Add the launcher if not in compact mode.
|
| + launcher_index = count;
|
| + ++count;
|
| + }
|
| +#endif
|
| +
|
| // Try to focus the next pane; if SetPaneFocusAndFocusDefault returns
|
| // false it means the pane didn't have any focusable controls, so skip
|
| // it and try the next one.
|
| @@ -996,7 +1014,22 @@ void BrowserView::RotatePaneFocus(bool forwards) {
|
| else
|
| index = ((index - 1) + count) % count;
|
|
|
| - if (index < pane_count) {
|
| + if (index >= normal_count) {
|
| +#if defined(OS_CHROMEOS) && defined(USE_AURA)
|
| + if (index == status_area_index) {
|
| + StatusAreaView* status_area =
|
| + ChromeShellDelegate::instance()->GetStatusArea();
|
| + if (status_area->SetPaneFocusAndFocusDefault()) {
|
| + status_area->GetWidget()->Activate();
|
| + break;
|
| + }
|
| + } else if (index == launcher_index) {
|
| + if (ash::Shell::GetInstance()->launcher()->Activate()) {
|
| + break;
|
| + }
|
| + }
|
| +#endif
|
| + } else if (index < pane_count) {
|
| if (accessible_panes[index]->SetPaneFocusAndFocusDefault())
|
| break;
|
| } else {
|
|
|