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

Unified Diff: ash/shell.cc

Issue 9564023: Revert 124461 - Remove the singleton instance get/delete methods from RootWindow (yay) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
===================================================================
--- ash/shell.cc (revision 124478)
+++ ash/shell.cc (working copy)
@@ -270,7 +270,11 @@
// Shell, public:
Shell::Shell(ShellDelegate* delegate)
- : root_window_(new aura::RootWindow),
+ : root_filter_(new internal::RootWindowEventFilter),
+#if !defined(OS_MACOSX)
+ nested_dispatcher_controller_(new NestedDispatcherController),
+ accelerator_controller_(new AcceleratorController),
+#endif
delegate_(delegate),
audio_controller_(NULL),
brightness_controller_(NULL),
@@ -279,6 +283,8 @@
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() {
@@ -314,10 +320,7 @@
// 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
@@ -353,18 +356,10 @@
// static
aura::RootWindow* Shell::GetRootWindow() {
- return GetInstance()->root_window_.get();
+ return aura::RootWindow::GetInstance();
}
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
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698