summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-17 12:41:21 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-17 12:41:21 +0000
commita273d33a741bead7f9818206170fb5635bbf8353 (patch)
tree785130208c4fe60f530a6d9edc54320f839364fd /ash/shell.cc
parent567de502376f70b8ae3cc5f41a77dc5842f65c9d (diff)
downloadchromium_src-a273d33a741bead7f9818206170fb5635bbf8353.zip
chromium_src-a273d33a741bead7f9818206170fb5635bbf8353.tar.gz
chromium_src-a273d33a741bead7f9818206170fb5635bbf8353.tar.bz2
[Cleanup] move root window controller init logic to root_window_controller.cc
Remove obsolete code and comments for 165214 BUG=273142,165214 Review URL: https://codereview.chromium.org/26800007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229106 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r--ash/shell.cc46
1 files changed, 5 insertions, 41 deletions
diff --git a/ash/shell.cc b/ash/shell.cc
index 5ad43a2..deae2eb 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -266,15 +266,8 @@ void Shell::ShowContextMenu(const gfx::Point& location_in_screen,
aura::RootWindow* root =
wm::GetRootWindowMatching(gfx::Rect(location_in_screen, gfx::Size()));
- // TODO(oshima): The root and root window controller shouldn't be
- // NULL even for the out-of-bounds |location_in_screen| (It should
- // return the primary root). Investigate why/how this is
- // happening. crbug.com/165214.
- internal::RootWindowController* rwc = internal::GetRootWindowController(root);
- CHECK(rwc) << "root=" << root
- << ", location:" << location_in_screen.ToString();
- if (rwc)
- rwc->ShowContextMenu(location_in_screen, source_type);
+ internal::GetRootWindowController(root)->
+ ShowContextMenu(location_in_screen, source_type);
}
void Shell::ToggleAppList(aura::Window* window) {
@@ -523,27 +516,6 @@ void Shell::SetTouchHudProjectionEnabled(bool enabled) {
OnTouchHudProjectionToggled(enabled));
}
-void Shell::InitRootWindowForSecondaryDisplay(aura::RootWindow* root) {
- internal::RootWindowController* controller =
- new internal::RootWindowController(root);
- // Pass false for the |is_first_run_after_boot| parameter so we'll show a
- // black background on this display instead of trying to mimic the boot splash
- // screen.
- InitRootWindowController(controller, false);
-
- controller->root_window_layout()->OnWindowResized();
- desktop_background_controller_->OnRootWindowAdded(root);
- high_contrast_controller_->OnRootWindowAdded(root);
- root->ShowRootWindow();
- // Activate new root for testing.
- // TODO(oshima): remove this.
- target_root_window_ = root;
-
- // Create a launcher if a user is already logged.
- if (Shell::GetInstance()->session_state_delegate()->NumberOfLoggedInUsers())
- controller->shelf()->CreateLauncher();
-}
-
void Shell::DoInitialWorkspaceAnimation() {
return GetPrimaryRootWindowController()->workspace_controller()->
DoInitialAnimation();
@@ -869,11 +841,9 @@ void Shell::Init() {
system_tray_delegate_.reset(delegate()->CreateSystemTrayDelegate());
DCHECK(system_tray_delegate_.get());
+ internal::RootWindowController::CreateForPrimaryDisplay(root_window);
internal::RootWindowController* root_window_controller =
- new internal::RootWindowController(root_window);
- InitRootWindowController(root_window_controller,
- delegate_->IsFirstRunAfterBoot());
- InitKeyboard(root_window_controller);
+ internal::GetRootWindowController(root_window);
locale_notification_controller_.reset(
new internal::LocaleNotificationController);
@@ -941,11 +911,7 @@ void Shell::InitKeyboard(internal::RootWindowController* root) {
}
}
-void Shell::InitRootWindowController(
- internal::RootWindowController* controller,
- bool first_run_after_boot) {
-
- aura::RootWindow* root_window = controller->root_window();
+void Shell::InitRootWindow(aura::RootWindow* root_window) {
DCHECK(activation_client_);
DCHECK(visibility_controller_.get());
DCHECK(drag_drop_controller_.get());
@@ -971,8 +937,6 @@ void Shell::InitRootWindowController(
}
if (user_action_client_)
aura::client::SetUserActionClient(root_window, user_action_client_.get());
-
- controller->Init(first_run_after_boot);
}
bool Shell::CanWindowReceiveEvents(aura::Window* window) {