| Index: ash/accelerators/focus_manager_factory.cc
|
| diff --git a/ash/accelerators/focus_manager_factory.cc b/ash/accelerators/focus_manager_factory.cc
|
| index 0695fd3e7a099318ae1e973ba03899ef78bd4ba2..31a202b21deb860ce1d4b3382bb224634c72017f 100644
|
| --- a/ash/accelerators/focus_manager_factory.cc
|
| +++ b/ash/accelerators/focus_manager_factory.cc
|
| @@ -16,10 +16,22 @@ AshFocusManagerFactory::~AshFocusManagerFactory() {}
|
| views::FocusManager* AshFocusManagerFactory::CreateFocusManager(
|
| views::Widget* widget,
|
| bool desktop_widget) {
|
| - return new views::FocusManager(widget, desktop_widget ? NULL : new Delegate);
|
| + views::FocusManager* focus_manager = new views::FocusManager(widget);
|
| + if (!desktop_widget)
|
| + accelerator_processor_.reset(new AcceleratorProcessor(focus_manager));
|
| + return focus_manager;
|
| }
|
|
|
| -bool AshFocusManagerFactory::Delegate::ProcessAccelerator(
|
| +AshFocusManagerFactory::AcceleratorProcessor::AcceleratorProcessor(
|
| + views::FocusManager* focus_manager)
|
| + : focus_manager_(focus_manager) {
|
| + focus_manager_->AddAcceleratorPostProcessor(this);
|
| +}
|
| +
|
| +AshFocusManagerFactory::AcceleratorProcessor::~AcceleratorProcessor() {
|
| +}
|
| +
|
| +bool AshFocusManagerFactory::AcceleratorProcessor::ProcessAccelerator(
|
| const ui::Accelerator& accelerator) {
|
| AcceleratorController* controller =
|
| Shell::GetInstance()->accelerator_controller();
|
| @@ -29,7 +41,7 @@ bool AshFocusManagerFactory::Delegate::ProcessAccelerator(
|
| }
|
|
|
| ui::AcceleratorTarget*
|
| -AshFocusManagerFactory::Delegate::GetCurrentTargetForAccelerator(
|
| +AshFocusManagerFactory::AcceleratorProcessor::GetTargetForAccelerator(
|
| const ui::Accelerator& accelerator) const {
|
| AcceleratorController* controller =
|
| Shell::GetInstance()->accelerator_controller();
|
|
|