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

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: Fix special index 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
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 "ash/accelerators/accelerator_controller.h"
sky 2012/01/31 16:38:15 Include ui/base/accelerators/accelerator instead.
Zachary Kuznia 2012/01/31 17:57:42 Done.
10
11 #include <vector>
sky 2012/01/31 16:38:15 vector should be the first include.
Zachary Kuznia 2012/01/31 17:57:42 Done.
12
13 namespace views {
14 class Widget;
15 } // namespace views
16
17 namespace ash {
18
sky 2012/01/31 16:38:15 If this class isn't needed outside of ash, put it
Zachary Kuznia 2012/01/31 17:57:42 Done.
19 // This class handles moving focus between a set of widgets and the main browser
20 // window.
21 class FocusCycler : public ui::AcceleratorTarget {
22 public:
23 FocusCycler();
24 ~FocusCycler();
sky 2012/01/31 16:38:15 virtual
Zachary Kuznia 2012/01/31 17:57:42 Done.
25
26 // Add a widget to the focus cycle and set up accelerators. The widget needs
27 // to have an AccessiblePaneView as the content view.
28 void AddWidget(views::Widget* widget);
29
30 // Move focus to the next widget.
31 void RotateFocus(bool forwards);
sky 2012/01/31 16:38:15 Use an enum to make it clear what true/value mean.
Zachary Kuznia 2012/01/31 17:57:42 Done.
32
33 // ui::AcceleratorTarget overrides
34 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
35 virtual bool CanHandleAccelerators() const OVERRIDE;
36
37 private:
38 ui::Accelerator ctrl_forward_key_;
sky 2012/01/31 16:38:15 Do these really need to exist as members? Can AddW
Zachary Kuznia 2012/01/31 17:57:42 Done.
39 ui::Accelerator ctrl_back_key_;
40
41 std::vector<views::Widget*> widgets_;
42
43 DISALLOW_COPY_AND_ASSIGN(FocusCycler);
44 };
45
46 } // namespace ash
47
48 #endif // FOCUS_CYCLER_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/focus_cycler.cc » ('j') | ash/focus_cycler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698