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

Side by Side Diff: ash/focus_cycler.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/ash.gyp ('k') | ash/focus_cycler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FOCUS_CYCLER_H_
6 #define FOCUS_CYCLER_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "base/compiler_specific.h"
12 #include "ui/base/accelerators/accelerator.h"
13
14 namespace views {
15 class Widget;
16 } // namespace views
17
18 namespace ash {
19
20 namespace internal {
21
22 // This class handles moving focus between a set of widgets and the main browser
23 // window.
24 class FocusCycler : public ui::AcceleratorTarget {
25 public:
26 enum Direction {
27 FORWARD,
28 BACKWARD
29 };
30
31 FocusCycler();
32 virtual ~FocusCycler();
33
34 // Add a widget to the focus cycle and set up accelerators. The widget needs
35 // to have an AccessiblePaneView as the content view.
36 void AddWidget(views::Widget* widget);
37
38 // Move focus to the next widget.
39 void RotateFocus(Direction direction);
40
41 // ui::AcceleratorTarget overrides
42 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
43 virtual bool CanHandleAccelerators() const OVERRIDE;
44
45 private:
46 std::vector<views::Widget*> widgets_;
47
48 DISALLOW_COPY_AND_ASSIGN(FocusCycler);
49 };
50
51 } // namespace internal
52
53 } // namespace ash
54
55 #endif // FOCUS_CYCLER_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/focus_cycler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698