OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/aura/mus/window_tree_client.h" | 5 #include "ui/aura/mus/window_tree_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 if (!io_task_runner) { | 198 if (!io_task_runner) { |
199 // |io_task_runner| is null in most case. But for the browser process, | 199 // |io_task_runner| is null in most case. But for the browser process, |
200 // the |io_task_runner| is the browser's IO thread. | 200 // the |io_task_runner| is the browser's IO thread. |
201 io_thread_ = base::MakeUnique<base::Thread>("IOThread"); | 201 io_thread_ = base::MakeUnique<base::Thread>("IOThread"); |
202 base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0); | 202 base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0); |
203 thread_options.priority = base::ThreadPriority::NORMAL; | 203 thread_options.priority = base::ThreadPriority::NORMAL; |
204 CHECK(io_thread_->StartWithOptions(thread_options)); | 204 CHECK(io_thread_->StartWithOptions(thread_options)); |
205 io_task_runner = io_thread_->task_runner(); | 205 io_task_runner = io_thread_->task_runner(); |
206 } | 206 } |
207 | 207 |
208 gpu_ = ui::Gpu::Create(connector, io_task_runner); | 208 gpu_ = ui::Gpu::Create(connector, ui::mojom::kServiceName, io_task_runner); |
209 compositor_context_factory_ = | 209 compositor_context_factory_ = |
210 base::MakeUnique<MusContextFactory>(gpu_.get()); | 210 base::MakeUnique<MusContextFactory>(gpu_.get()); |
211 initial_context_factory_ = Env::GetInstance()->context_factory(); | 211 initial_context_factory_ = Env::GetInstance()->context_factory(); |
212 Env::GetInstance()->set_context_factory(compositor_context_factory_.get()); | 212 Env::GetInstance()->set_context_factory(compositor_context_factory_.get()); |
213 | 213 |
214 // WindowServerTest will create more than one WindowTreeClient. We will not | 214 // WindowServerTest will create more than one WindowTreeClient. We will not |
215 // create the discardable memory manager for those tests. | 215 // create the discardable memory manager for those tests. |
216 if (create_discardable_memory) { | 216 if (create_discardable_memory) { |
217 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; | 217 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; |
218 connector->BindInterface(ui::mojom::kServiceName, &manager_ptr); | 218 connector->BindInterface(ui::mojom::kServiceName, &manager_ptr); |
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1864 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1864 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
1865 this, capture_synchronizer_.get(), window)); | 1865 this, capture_synchronizer_.get(), window)); |
1866 } | 1866 } |
1867 | 1867 |
1868 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1868 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
1869 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1869 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
1870 this, focus_synchronizer_.get(), window)); | 1870 this, focus_synchronizer_.get(), window)); |
1871 } | 1871 } |
1872 | 1872 |
1873 } // namespace aura | 1873 } // namespace aura |
OLD | NEW |