OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/ui/gpu/gpu_service_mus.h" | 5 #include "services/ui/gpu/gpu_service_mus.h" |
6 | 6 |
7 #include "base/memory/shared_memory.h" | 7 #include "base/memory/shared_memory.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 #if defined(OS_WIN) | 145 #if defined(OS_WIN) |
146 void GpuServiceMus::SendAcceleratedSurfaceCreatedChildWindow( | 146 void GpuServiceMus::SendAcceleratedSurfaceCreatedChildWindow( |
147 gpu::SurfaceHandle parent_window, | 147 gpu::SurfaceHandle parent_window, |
148 gpu::SurfaceHandle child_window) { | 148 gpu::SurfaceHandle child_window) { |
149 NOTIMPLEMENTED(); | 149 NOTIMPLEMENTED(); |
150 } | 150 } |
151 #endif | 151 #endif |
152 | 152 |
153 void GpuServiceMus::SetActiveURL(const GURL& url) { | 153 void GpuServiceMus::SetActiveURL(const GURL& url) { |
154 NOTIMPLEMENTED(); | 154 // TODO(penghuang): implement this function. |
155 } | 155 } |
156 | 156 |
157 void GpuServiceMus::Initialize() { | 157 void GpuServiceMus::Initialize() { |
158 DCHECK(CalledOnValidThread()); | 158 DCHECK(CalledOnValidThread()); |
159 base::Thread::Options thread_options(base::MessageLoop::TYPE_DEFAULT, 0); | 159 base::Thread::Options thread_options(base::MessageLoop::TYPE_DEFAULT, 0); |
160 thread_options.priority = base::ThreadPriority::NORMAL; | 160 thread_options.priority = base::ThreadPriority::NORMAL; |
161 CHECK(gpu_thread_.StartWithOptions(thread_options)); | 161 CHECK(gpu_thread_.StartWithOptions(thread_options)); |
162 | 162 |
163 thread_options = base::Thread::Options(base::MessageLoop::TYPE_IO, 0); | 163 thread_options = base::Thread::Options(base::MessageLoop::TYPE_IO, 0); |
164 thread_options.priority = base::ThreadPriority::NORMAL; | 164 thread_options.priority = base::ThreadPriority::NORMAL; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 return shm; | 264 return shm; |
265 } | 265 } |
266 | 266 |
267 // static | 267 // static |
268 GpuServiceMus* GpuServiceMus::GetInstance() { | 268 GpuServiceMus* GpuServiceMus::GetInstance() { |
269 return base::Singleton<GpuServiceMus, | 269 return base::Singleton<GpuServiceMus, |
270 base::LeakySingletonTraits<GpuServiceMus>>::get(); | 270 base::LeakySingletonTraits<GpuServiceMus>>::get(); |
271 } | 271 } |
272 | 272 |
273 } // namespace ui | 273 } // namespace ui |
OLD | NEW |