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

Side by Side Diff: chrome/browser/ui/ash/ash_init.cc

Issue 2833093002: WIP: simplified display management in ash (Closed)
Patch Set: merge and more fixs Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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 "chrome/browser/ui/ash/ash_init.h" 5 #include "chrome/browser/ui/ash/ash_init.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 8 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
9 #include "ash/accessibility_types.h" 9 #include "ash/accessibility_types.h"
10 #include "ash/aura/shell_port_classic.h" 10 #include "ash/aura/shell_port_classic.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 shell_init_params.context_factory_private = 57 shell_init_params.context_factory_private =
58 content::GetContextFactoryPrivate(); 58 content::GetContextFactoryPrivate();
59 shell_init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); 59 shell_init_params.blocking_pool = content::BrowserThread::GetBlockingPool();
60 60
61 ash::Shell::CreateInstance(shell_init_params); 61 ash::Shell::CreateInstance(shell_init_params);
62 } 62 }
63 63
64 std::unique_ptr<ash::mus::WindowManager> CreateMusShell() { 64 std::unique_ptr<ash::mus::WindowManager> CreateMusShell() {
65 service_manager::Connector* connector = 65 service_manager::Connector* connector =
66 content::ServiceManagerConnection::GetForProcess()->GetConnector(); 66 content::ServiceManagerConnection::GetForProcess()->GetConnector();
67 const bool show_primary_host_on_connect = true;
67 std::unique_ptr<ash::mus::WindowManager> window_manager = 68 std::unique_ptr<ash::mus::WindowManager> window_manager =
68 base::MakeUnique<ash::mus::WindowManager>(connector, ash::Config::MUS); 69 base::MakeUnique<ash::mus::WindowManager>(connector, ash::Config::MUS,
70 show_primary_host_on_connect);
69 std::unique_ptr<aura::WindowTreeClient> window_tree_client = 71 std::unique_ptr<aura::WindowTreeClient> window_tree_client =
70 base::MakeUnique<aura::WindowTreeClient>(connector, window_manager.get(), 72 base::MakeUnique<aura::WindowTreeClient>(connector, window_manager.get(),
71 window_manager.get()); 73 window_manager.get());
72 window_tree_client->ConnectAsWindowManager(); 74 // XXX!
75 window_tree_client->ConnectAsWindowManager(false);
73 aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client.get()); 76 aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client.get());
74 window_manager->Init(std::move(window_tree_client), 77 window_manager->Init(std::move(window_tree_client),
75 content::BrowserThread::GetBlockingPool(), 78 content::BrowserThread::GetBlockingPool(),
76 base::MakeUnique<ChromeShellDelegate>()); 79 base::MakeUnique<ChromeShellDelegate>());
77 CHECK(window_manager->WaitForInitialDisplays()); 80 CHECK(window_manager->WaitForInitialDisplays());
78 return window_manager; 81 return window_manager;
79 } 82 }
80 83
81 } // namespace 84 } // namespace
82 85
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); 152 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show();
150 } 153 }
151 154
152 AshInit::~AshInit() { 155 AshInit::~AshInit() {
153 // |window_manager_| deletes the Shell. 156 // |window_manager_| deletes the Shell.
154 if (!window_manager_ && ash::Shell::HasInstance()) { 157 if (!window_manager_ && ash::Shell::HasInstance()) {
155 ash::Shell::DeleteInstance(); 158 ash::Shell::DeleteInstance();
156 ash::ShellContentState::DestroyInstance(); 159 ash::ShellContentState::DestroyInstance();
157 } 160 }
158 } 161 }
OLDNEW
« no previous file with comments | « chrome/app/mash/chrome_mus_manifest.json ('k') | chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698