| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/shell/content_client/shell_browser_main_parts.h" | 5 #include "ash/shell/content_client/shell_browser_main_parts.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell/shell_delegate_impl.h" | 10 #include "ash/shell/shell_delegate_impl.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 window_watcher_.reset(new ash::shell::WindowWatcher); | 127 window_watcher_.reset(new ash::shell::WindowWatcher); |
| 128 gfx::Screen* screen = Shell::GetInstance()->GetScreen(); | 128 gfx::Screen* screen = Shell::GetInstance()->GetScreen(); |
| 129 screen->AddObserver(window_watcher_.get()); | 129 screen->AddObserver(window_watcher_.get()); |
| 130 delegate_->SetWatcher(window_watcher_.get()); | 130 delegate_->SetWatcher(window_watcher_.get()); |
| 131 | 131 |
| 132 ash::shell::InitWindowTypeLauncher(); | 132 ash::shell::InitWindowTypeLauncher(); |
| 133 | 133 |
| 134 Shell::GetInstance()->desktop_background_controller()->SetDefaultWallpaper( | 134 Shell::GetInstance()->desktop_background_controller()->SetDefaultWallpaper( |
| 135 false /* is_guest */); | 135 false /* is_guest */); |
| 136 | 136 |
| 137 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); | 137 ash::Shell::GetPrimaryRootWindow()->GetDispatcher()->ShowRootWindow(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void ShellBrowserMainParts::PostMainMessageLoopRun() { | 140 void ShellBrowserMainParts::PostMainMessageLoopRun() { |
| 141 gfx::Screen* screen = Shell::GetInstance()->GetScreen(); | 141 gfx::Screen* screen = Shell::GetInstance()->GetScreen(); |
| 142 screen->RemoveObserver(window_watcher_.get()); | 142 screen->RemoveObserver(window_watcher_.get()); |
| 143 | 143 |
| 144 window_watcher_.reset(); | 144 window_watcher_.reset(); |
| 145 delegate_->SetWatcher(NULL); | 145 delegate_->SetWatcher(NULL); |
| 146 delegate_ = NULL; | 146 delegate_ = NULL; |
| 147 ash::Shell::DeleteInstance(); | 147 ash::Shell::DeleteInstance(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 162 browser_context_.reset(); | 162 browser_context_.reset(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { | 165 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { |
| 166 base::MessageLoopForUI::current()->Run(); | 166 base::MessageLoopForUI::current()->Run(); |
| 167 return true; | 167 return true; |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace shell | 170 } // namespace shell |
| 171 } // namespace ash | 171 } // namespace ash |
| OLD | NEW |