| Index: ash/shell.cc
|
| ===================================================================
|
| --- ash/shell.cc (revision 124527)
|
| +++ ash/shell.cc (working copy)
|
| @@ -270,11 +270,7 @@
|
| // Shell, public:
|
|
|
| Shell::Shell(ShellDelegate* delegate)
|
| - : root_filter_(new internal::RootWindowEventFilter),
|
| -#if !defined(OS_MACOSX)
|
| - nested_dispatcher_controller_(new NestedDispatcherController),
|
| - accelerator_controller_(new AcceleratorController),
|
| -#endif
|
| + : root_window_(new aura::RootWindow),
|
| delegate_(delegate),
|
| audio_controller_(NULL),
|
| brightness_controller_(NULL),
|
| @@ -283,8 +279,6 @@
|
| desktop_background_mode_(BACKGROUND_IMAGE),
|
| root_window_layout_(NULL),
|
| status_widget_(NULL) {
|
| - // Pass ownership of the filter to the root window.
|
| - GetRootWindow()->SetEventFilter(root_filter_);
|
| }
|
|
|
| Shell::~Shell() {
|
| @@ -320,7 +314,10 @@
|
|
|
| // These need a valid Shell instance to clean up properly, so explicitly
|
| // delete them before invalidating the instance.
|
| + // Alphabetical.
|
| + activation_controller_.reset();
|
| drag_drop_controller_.reset();
|
| + shadow_controller_.reset();
|
| window_cycle_controller_.reset();
|
|
|
| // Launcher widget has a InputMethodBridge that references to
|
| @@ -356,10 +353,18 @@
|
|
|
| // static
|
| aura::RootWindow* Shell::GetRootWindow() {
|
| - return aura::RootWindow::GetInstance();
|
| + return GetInstance()->root_window_.get();
|
| }
|
|
|
| void Shell::Init() {
|
| + root_filter_ = new internal::RootWindowEventFilter;
|
| +#if !defined(OS_MACOSX)
|
| + nested_dispatcher_controller_.reset(new NestedDispatcherController);
|
| + accelerator_controller_.reset(new AcceleratorController);
|
| +#endif
|
| + // Pass ownership of the filter to the root window.
|
| + GetRootWindow()->SetEventFilter(root_filter_);
|
| +
|
| DCHECK(!GetRootWindowEventFilterCount());
|
|
|
| // PartialScreenshotEventFilter must be the first one to capture key
|
|
|