| 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 "content/browser/gpu/browser_gpu_channel_host_factory.h" | 5 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/threading/thread_restrictions.h" | 8 #include "base/threading/thread_restrictions.h" |
| 9 #include "content/browser/gpu/gpu_data_manager_impl.h" | 9 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 10 #include "content/browser/gpu/gpu_process_host.h" | 10 #include "content/browser/gpu/gpu_process_host.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool BrowserGpuChannelHostFactory::IsMainThread() { | 61 bool BrowserGpuChannelHostFactory::IsMainThread() { |
| 62 return BrowserThread::CurrentlyOn(BrowserThread::UI); | 62 return BrowserThread::CurrentlyOn(BrowserThread::UI); |
| 63 } | 63 } |
| 64 | 64 |
| 65 bool BrowserGpuChannelHostFactory::IsIOThread() { | 65 bool BrowserGpuChannelHostFactory::IsIOThread() { |
| 66 return BrowserThread::CurrentlyOn(BrowserThread::IO); | 66 return BrowserThread::CurrentlyOn(BrowserThread::IO); |
| 67 } | 67 } |
| 68 | 68 |
| 69 MessageLoop* BrowserGpuChannelHostFactory::GetMainLoop() { | 69 base::MessageLoop* BrowserGpuChannelHostFactory::GetMainLoop() { |
| 70 return BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::UI); | 70 return BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::UI); |
| 71 } | 71 } |
| 72 | 72 |
| 73 scoped_refptr<base::MessageLoopProxy> | 73 scoped_refptr<base::MessageLoopProxy> |
| 74 BrowserGpuChannelHostFactory::GetIOLoopProxy() { | 74 BrowserGpuChannelHostFactory::GetIOLoopProxy() { |
| 75 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); | 75 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
| 76 } | 76 } |
| 77 | 77 |
| 78 base::WaitableEvent* BrowserGpuChannelHostFactory::GetShutDownEvent() { | 78 base::WaitableEvent* BrowserGpuChannelHostFactory::GetShutDownEvent() { |
| 79 return shutdown_event_.get(); | 79 return shutdown_event_.get(); |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 filter->AddRoute(MSG_ROUTING_CONTROL, handler); | 313 filter->AddRoute(MSG_ROUTING_CONTROL, handler); |
| 314 | 314 |
| 315 GetIOLoopProxy()->PostTask( | 315 GetIOLoopProxy()->PostTask( |
| 316 FROM_HERE, | 316 FROM_HERE, |
| 317 base::Bind(&BrowserGpuChannelHostFactory::AddFilterOnIO, | 317 base::Bind(&BrowserGpuChannelHostFactory::AddFilterOnIO, |
| 318 gpu_host_id_, | 318 gpu_host_id_, |
| 319 filter)); | 319 filter)); |
| 320 } | 320 } |
| 321 | 321 |
| 322 } // namespace content | 322 } // namespace content |
| OLD | NEW |