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

Unified Diff: ash/shell.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.h ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index b1203bccd11afc22cab89198fcee42bf5d755802..21b75c24d7436702f767b0fb4af74d66e7453a47 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -11,6 +11,7 @@
#include "ash/app_list/app_list.h"
#include "ash/ash_switches.h"
#include "ash/drag_drop/drag_drop_controller.h"
+#include "ash/focus_cycler.h"
#include "ash/ime/input_method_event_filter.h"
#include "ash/launcher/launcher.h"
#include "ash/shell_delegate.h"
@@ -311,6 +312,10 @@ void Shell::Init() {
if (!command_line->HasSwitch(switches::kAuraNoShadows))
shadow_controller_.reset(new internal::ShadowController());
+ focus_cycler_.reset(new internal::FocusCycler());
+ focus_cycler_->AddWidget(status_widget_);
+ focus_cycler_->AddWidget(launcher_->widget());
+
// Force a layout.
root_window->layout_manager()->OnWindowResized();
@@ -435,6 +440,12 @@ views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView(
return NULL;
}
+void Shell::RotateFocus(Direction direction) {
+ focus_cycler_->RotateFocus(
+ direction == FORWARD ? internal::FocusCycler::FORWARD :
+ internal::FocusCycler::BACKWARD);
+}
+
////////////////////////////////////////////////////////////////////////////////
// Shell, private:
« no previous file with comments | « ash/shell.h ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698