| 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/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
| 9 #include "ash/content/shell_content_state.h" | 9 #include "ash/content/shell_content_state.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 ShellContentState::SetInstance( | 126 ShellContentState::SetInstance( |
| 127 new ShellContentStateImpl(browser_context_.get())); | 127 new ShellContentStateImpl(browser_context_.get())); |
| 128 ui::MaterialDesignController::Initialize(); | 128 ui::MaterialDesignController::Initialize(); |
| 129 ash::ShellInitParams init_params; | 129 ash::ShellInitParams init_params; |
| 130 init_params.delegate = delegate_; | 130 init_params.delegate = delegate_; |
| 131 init_params.context_factory = content::GetContextFactory(); | 131 init_params.context_factory = content::GetContextFactory(); |
| 132 init_params.context_factory_private = content::GetContextFactoryPrivate(); | 132 init_params.context_factory_private = content::GetContextFactoryPrivate(); |
| 133 init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); | 133 init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); |
| 134 ash::Shell::CreateInstance(init_params); | 134 ash::Shell::CreateInstance(init_params); |
| 135 | 135 |
| 136 // Initialize session controller client and create fake sessions before | 136 // Initialize session controller client and create fake user sessions. The |
| 137 // creating shelf. | 137 // fake user sessions makes ash into the logged in state. |
| 138 example_session_controller_client_ = | 138 example_session_controller_client_ = |
| 139 base::MakeUnique<ExampleSessionControllerClient>( | 139 base::MakeUnique<ExampleSessionControllerClient>( |
| 140 Shell::Get()->session_controller()); | 140 Shell::Get()->session_controller()); |
| 141 example_session_controller_client_->Initialize(); | 141 example_session_controller_client_->Initialize(); |
| 142 | 142 |
| 143 ash::Shell::Get()->CreateShelfView(); | |
| 144 ash::Shell::Get()->UpdateAfterLoginStatusChange(LoginStatus::USER); | |
| 145 | |
| 146 window_watcher_.reset(new ash::shell::WindowWatcher); | 143 window_watcher_.reset(new ash::shell::WindowWatcher); |
| 147 display::Screen::GetScreen()->AddObserver(window_watcher_.get()); | 144 display::Screen::GetScreen()->AddObserver(window_watcher_.get()); |
| 148 | 145 |
| 149 ash::shell::InitWindowTypeLauncher(); | 146 ash::shell::InitWindowTypeLauncher(); |
| 150 | 147 |
| 151 // Initialize the example app list presenter. | 148 // Initialize the example app list presenter. |
| 152 example_app_list_presenter_ = base::MakeUnique<ExampleAppListPresenter>(); | 149 example_app_list_presenter_ = base::MakeUnique<ExampleAppListPresenter>(); |
| 153 Shell::Get()->app_list()->SetAppListPresenter( | 150 Shell::Get()->app_list()->SetAppListPresenter( |
| 154 example_app_list_presenter_->CreateInterfacePtrAndBind()); | 151 example_app_list_presenter_->CreateInterfacePtrAndBind()); |
| 155 | 152 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 178 browser_context_.reset(); | 175 browser_context_.reset(); |
| 179 } | 176 } |
| 180 | 177 |
| 181 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { | 178 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { |
| 182 base::RunLoop().Run(); | 179 base::RunLoop().Run(); |
| 183 return true; | 180 return true; |
| 184 } | 181 } |
| 185 | 182 |
| 186 } // namespace shell | 183 } // namespace shell |
| 187 } // namespace ash | 184 } // namespace ash |
| OLD | NEW |