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

Side by Side Diff: ash/mus/window_manager_application.cc

Issue 2692663002: Gut ash::MaterialDesignController, and remove the about:flags entry. (Closed)
Patch Set: yet another rebase Created 3 years, 10 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
« no previous file with comments | « ash/mus/test/wm_test_helper.cc ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/mus/window_manager_application.h" 5 #include "ash/mus/window_manager_application.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/mojo_interface_factory.h" 9 #include "ash/common/mojo_interface_factory.h"
11 #include "ash/common/system/chromeos/power/power_status.h" 10 #include "ash/common/system/chromeos/power/power_status.h"
12 #include "ash/common/wm_shell.h" 11 #include "ash/common/wm_shell.h"
13 #include "ash/mus/network_connect_delegate_mus.h" 12 #include "ash/mus/network_connect_delegate_mus.h"
14 #include "ash/mus/window_manager.h" 13 #include "ash/mus/window_manager.h"
15 #include "base/bind.h" 14 #include "base/bind.h"
16 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
17 #include "base/threading/thread_task_runner_handle.h" 16 #include "base/threading/thread_task_runner_handle.h"
18 #include "chromeos/audio/cras_audio_handler.h" 17 #include "chromeos/audio/cras_audio_handler.h"
19 #include "chromeos/dbus/dbus_thread_manager.h" 18 #include "chromeos/dbus/dbus_thread_manager.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 message_center::MessageCenter::Shutdown(); 105 message_center::MessageCenter::Shutdown();
107 } 106 }
108 107
109 void WindowManagerApplication::OnStart() { 108 void WindowManagerApplication::OnStart() {
110 aura_init_ = base::MakeUnique<views::AuraInit>( 109 aura_init_ = base::MakeUnique<views::AuraInit>(
111 context()->connector(), context()->identity(), "ash_mus_resources.pak", 110 context()->connector(), context()->identity(), "ash_mus_resources.pak",
112 "ash_mus_resources_200.pak", nullptr, 111 "ash_mus_resources_200.pak", nullptr,
113 views::AuraInit::Mode::AURA_MUS_WINDOW_MANAGER); 112 views::AuraInit::Mode::AURA_MUS_WINDOW_MANAGER);
114 window_manager_.reset(new WindowManager(context()->connector())); 113 window_manager_.reset(new WindowManager(context()->connector()));
115 114
116 MaterialDesignController::Initialize();
117
118 tracing_.Initialize(context()->connector(), context()->identity().name()); 115 tracing_.Initialize(context()->connector(), context()->identity().name());
119 116
120 std::unique_ptr<aura::WindowTreeClient> window_tree_client = 117 std::unique_ptr<aura::WindowTreeClient> window_tree_client =
121 base::MakeUnique<aura::WindowTreeClient>( 118 base::MakeUnique<aura::WindowTreeClient>(
122 context()->connector(), window_manager_.get(), window_manager_.get()); 119 context()->connector(), window_manager_.get(), window_manager_.get());
123 window_tree_client->ConnectAsWindowManager(); 120 window_tree_client->ConnectAsWindowManager();
124 121
125 const size_t kMaxNumberThreads = 3u; // Matches that of content. 122 const size_t kMaxNumberThreads = 3u; // Matches that of content.
126 const char kThreadNamePrefix[] = "MashBlocking"; 123 const char kThreadNamePrefix[] = "MashBlocking";
127 blocking_pool_ = new base::SequencedWorkerPool( 124 blocking_pool_ = new base::SequencedWorkerPool(
128 kMaxNumberThreads, kThreadNamePrefix, base::TaskPriority::USER_VISIBLE); 125 kMaxNumberThreads, kThreadNamePrefix, base::TaskPriority::USER_VISIBLE);
129 InitWindowManager(std::move(window_tree_client), blocking_pool_); 126 InitWindowManager(std::move(window_tree_client), blocking_pool_);
130 } 127 }
131 128
132 bool WindowManagerApplication::OnConnect( 129 bool WindowManagerApplication::OnConnect(
133 const service_manager::ServiceInfo& remote_info, 130 const service_manager::ServiceInfo& remote_info,
134 service_manager::InterfaceRegistry* registry) { 131 service_manager::InterfaceRegistry* registry) {
135 // Register services used in both classic ash and mash. 132 // Register services used in both classic ash and mash.
136 mojo_interface_factory::RegisterInterfaces( 133 mojo_interface_factory::RegisterInterfaces(
137 registry, base::ThreadTaskRunnerHandle::Get()); 134 registry, base::ThreadTaskRunnerHandle::Get());
138 return true; 135 return true;
139 } 136 }
140 137
141 } // namespace mus 138 } // namespace mus
142 } // namespace ash 139 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/test/wm_test_helper.cc ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698