Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7332)

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 9295049: Allow focus to be sent between browser window and launcher/status window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review fix Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b63cfec7133254c4cd84b3b5bdfdb9ec16bfe712..5fc6a9fe6dad4763c0f74cf2d86982754f6b4c67 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -961,6 +961,7 @@ void BrowserView::RotatePaneFocus(bool forwards) {
std::vector<views::AccessiblePaneView*> accessible_panes;
GetAccessiblePanes(&accessible_panes);
int pane_count = static_cast<int>(accessible_panes.size());
+ int special_index = -1;
std::vector<views::View*> accessible_views(
accessible_panes.begin(), accessible_panes.end());
@@ -987,6 +988,12 @@ void BrowserView::RotatePaneFocus(bool forwards) {
if (focused_view && index >= pane_count)
GetFocusManager()->StoreFocusedView();
+#if defined(OS_CHROMEOS) && defined(USE_AURA)
+ // Add the special panes to the rotation.
+ special_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 +1003,13 @@ void BrowserView::RotatePaneFocus(bool forwards) {
else
index = ((index - 1) + count) % count;
- if (index < pane_count) {
+ if (index == special_index) {
+#if defined(OS_CHROMEOS) && defined(USE_AURA)
+ ash::Shell::GetInstance()->RotateFocus(
+ forwards ? ash::Shell::FORWARD : ash::Shell::BACKWARD);
+ break;
+#endif
+ } else if (index < pane_count) {
if (accessible_panes[index]->SetPaneFocusAndFocusDefault())
break;
} else {
« no previous file with comments | « ash/shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698