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

Unified Diff: views/focus/focus_manager.h

Issue 8508056: Split a part of code managing accelerators from views::FocusManager. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 9 years, 1 month 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 | « ui/ui.gyp ('k') | views/focus/focus_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/focus/focus_manager.h
diff --git a/views/focus/focus_manager.h b/views/focus/focus_manager.h
index 8ac84c5de80bab4e93b58e1947baa0649b9ae164..5d4caa7cbdb7e6ebaf507ba0fd105b2660fd8dd3 100644
--- a/views/focus/focus_manager.h
+++ b/views/focus/focus_manager.h
@@ -10,6 +10,7 @@
#include <map>
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "ui/base/models/accelerator.h"
#include "ui/gfx/native_widget_types.h"
@@ -71,6 +72,11 @@
// Note that FocusTraversable do not have to be RootViews: AccessibleToolbarView
// is FocusTraversable.
+namespace ui {
+class AcceleratorTarget;
+class AcceleratorManager;
+}
+
namespace views {
class FocusSearch;
@@ -253,6 +259,9 @@ class VIEWS_EXPORT FocusManager {
// The view that currently is focused.
View* focused_view_;
+ // The AcceleratorManager this FocusManager is associated with.
+ scoped_ptr<ui::AcceleratorManager> accelerator_manager_;
+
// The storage id used in the ViewStorage to store/restore the view that last
// had focus.
int stored_focused_view_storage_id_;
@@ -260,11 +269,6 @@ class VIEWS_EXPORT FocusManager {
// The reason why the focus most recently changed.
FocusChangeReason focus_change_reason_;
- // The accelerators and associated targets.
- typedef std::list<ui::AcceleratorTarget*> AcceleratorTargetList;
- typedef std::map<ui::Accelerator, AcceleratorTargetList> AcceleratorMap;
- AcceleratorMap accelerators_;
-
// The list of registered FocusChange listeners.
ObserverList<FocusChangeListener, true> focus_change_listeners_;
« no previous file with comments | « ui/ui.gyp ('k') | views/focus/focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698