| Index: ui/aura_shell/shell.cc
|
| diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc
|
| index 087a3155b9fcebe242b43da00c57b777aa2182e3..100f2e9250ab5874f8836fca78130a56e3bb4007 100644
|
| --- a/ui/aura_shell/shell.cc
|
| +++ b/ui/aura_shell/shell.cc
|
| @@ -9,7 +9,9 @@
|
| #include "base/bind.h"
|
| #include "base/command_line.h"
|
| #include "ui/aura/root_window.h"
|
| +#include "ui/aura/client/aura_constants.h"
|
| #include "ui/aura/layout_manager.h"
|
| +#include "ui/aura/root_window.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/aura_shell/activation_controller.h"
|
| #include "ui/aura_shell/app_list.h"
|
| @@ -18,11 +20,12 @@
|
| #include "ui/aura_shell/compact_status_area_layout_manager.h"
|
| #include "ui/aura_shell/default_container_event_filter.h"
|
| #include "ui/aura_shell/default_container_layout_manager.h"
|
| -#include "ui/aura_shell/root_window_event_filter.h"
|
| -#include "ui/aura_shell/root_window_layout_manager.h"
|
| #include "ui/aura_shell/drag_drop_controller.h"
|
| +#include "ui/aura_shell/input_method_event_filter.h"
|
| #include "ui/aura_shell/launcher/launcher.h"
|
| #include "ui/aura_shell/modal_container_layout_manager.h"
|
| +#include "ui/aura_shell/root_window_event_filter.h"
|
| +#include "ui/aura_shell/root_window_layout_manager.h"
|
| #include "ui/aura_shell/shadow_controller.h"
|
| #include "ui/aura_shell/shelf_layout_manager.h"
|
| #include "ui/aura_shell/shell_accelerator_controller.h"
|
| @@ -125,6 +128,7 @@ Shell::Shell(ShellDelegate* delegate)
|
| }
|
|
|
| Shell::~Shell() {
|
| + RemoveRootWindowEventFilter(input_method_filter_.get());
|
| RemoveRootWindowEventFilter(accelerator_filter_.get());
|
|
|
| // TooltipController needs a valid shell instance. We delete it before
|
| @@ -200,6 +204,12 @@ void Shell::Init() {
|
| // Force a layout.
|
| root_window->layout_manager()->OnWindowResized();
|
|
|
| + // Initialize InputMethodEventFilter. The filter must be added first since it
|
| + // has the highest priority.
|
| + DCHECK(!GetRootWindowEventFilterCount());
|
| + input_method_filter_.reset(new internal::InputMethodEventFilter);
|
| + AddRootWindowEventFilter(input_method_filter_.get());
|
| +
|
| // Initialize ShellAcceleratorFilter
|
| accelerator_filter_.reset(new internal::ShellAcceleratorFilter);
|
| AddRootWindowEventFilter(accelerator_filter_.get());
|
| @@ -285,6 +295,11 @@ void Shell::RemoveRootWindowEventFilter(aura::EventFilter* filter) {
|
| aura::RootWindow::GetInstance()->event_filter())->RemoveFilter(filter);
|
| }
|
|
|
| +size_t Shell::GetRootWindowEventFilterCount() const {
|
| + return static_cast<internal::RootWindowEventFilter*>(
|
| + aura::RootWindow::GetInstance()->event_filter())->GetFilterCount();
|
| +}
|
| +
|
| void Shell::ToggleOverview() {
|
| if (workspace_controller_.get())
|
| workspace_controller_->ToggleOverview();
|
|
|