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/common/login_status.h" | 7 #include "ash/common/login_status.h" |
8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
| 9 #include "ash/common/wm_shell.h" |
9 #include "ash/content/shell_content_state.h" | 10 #include "ash/content/shell_content_state.h" |
10 #include "ash/shell.h" | 11 #include "ash/shell.h" |
11 #include "ash/shell/content/shell_content_state_impl.h" | 12 #include "ash/shell/content/shell_content_state_impl.h" |
12 #include "ash/shell/shell_delegate_impl.h" | 13 #include "ash/shell/shell_delegate_impl.h" |
13 #include "ash/shell/window_watcher.h" | 14 #include "ash/shell/window_watcher.h" |
14 #include "ash/shell_init_params.h" | 15 #include "ash/shell_init_params.h" |
15 #include "base/bind.h" | 16 #include "base/bind.h" |
16 #include "base/command_line.h" | 17 #include "base/command_line.h" |
17 #include "base/i18n/icu_util.h" | 18 #include "base/i18n/icu_util.h" |
18 #include "base/message_loop/message_loop.h" | 19 #include "base/message_loop/message_loop.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 #endif | 130 #endif |
130 | 131 |
131 ShellContentState::SetInstance( | 132 ShellContentState::SetInstance( |
132 new ShellContentStateImpl(browser_context_.get())); | 133 new ShellContentStateImpl(browser_context_.get())); |
133 ui::MaterialDesignController::Initialize(); | 134 ui::MaterialDesignController::Initialize(); |
134 ash::ShellInitParams init_params; | 135 ash::ShellInitParams init_params; |
135 init_params.delegate = delegate_; | 136 init_params.delegate = delegate_; |
136 init_params.context_factory = content::GetContextFactory(); | 137 init_params.context_factory = content::GetContextFactory(); |
137 init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); | 138 init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); |
138 ash::Shell::CreateInstance(init_params); | 139 ash::Shell::CreateInstance(init_params); |
139 ash::Shell::GetInstance()->CreateShelf(); | 140 ash::WmShell::Get()->CreateShelf(); |
140 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(LoginStatus::USER); | 141 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(LoginStatus::USER); |
141 | 142 |
142 window_watcher_.reset(new ash::shell::WindowWatcher); | 143 window_watcher_.reset(new ash::shell::WindowWatcher); |
143 display::Screen::GetScreen()->AddObserver(window_watcher_.get()); | 144 display::Screen::GetScreen()->AddObserver(window_watcher_.get()); |
144 | 145 |
145 ash::shell::InitWindowTypeLauncher(); | 146 ash::shell::InitWindowTypeLauncher(); |
146 | 147 |
147 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 148 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
148 } | 149 } |
149 | 150 |
(...skipping 21 matching lines...) Expand all Loading... |
171 browser_context_.reset(); | 172 browser_context_.reset(); |
172 } | 173 } |
173 | 174 |
174 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { | 175 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { |
175 base::RunLoop().Run(); | 176 base::RunLoop().Run(); |
176 return true; | 177 return true; |
177 } | 178 } |
178 | 179 |
179 } // namespace shell | 180 } // namespace shell |
180 } // namespace ash | 181 } // namespace ash |
OLD | NEW |