| 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 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
| 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/process.h" | 10 #include "base/process.h" |
| 11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
| 12 #include "content/common/content_export.h" |
| 12 #include "content/common/gpu/client/gpu_channel_host.h" | 13 #include "content/common/gpu/client/gpu_channel_host.h" |
| 13 #include "ipc/ipc_channel_handle.h" | 14 #include "ipc/ipc_channel_handle.h" |
| 14 | 15 |
| 15 namespace content { | 16 namespace content { |
| 16 | 17 |
| 17 class BrowserGpuChannelHostFactory : public GpuChannelHostFactory { | 18 class CONTENT_EXPORT BrowserGpuChannelHostFactory : |
| 19 public GpuChannelHostFactory { |
| 18 public: | 20 public: |
| 19 static void Initialize(); | 21 static void Initialize(); |
| 20 static void Terminate(); | 22 static void Terminate(); |
| 21 static BrowserGpuChannelHostFactory* instance() { return instance_; } | 23 static BrowserGpuChannelHostFactory* instance() { return instance_; } |
| 22 | 24 |
| 23 // GpuChannelHostFactory implementation. | 25 // GpuChannelHostFactory implementation. |
| 24 virtual bool IsMainThread() OVERRIDE; | 26 virtual bool IsMainThread() OVERRIDE; |
| 25 virtual bool IsIOThread() OVERRIDE; | 27 virtual bool IsIOThread() OVERRIDE; |
| 26 virtual MessageLoop* GetMainLoop() OVERRIDE; | 28 virtual MessageLoop* GetMainLoop() OVERRIDE; |
| 27 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE; | 29 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 int gpu_host_id_; | 100 int gpu_host_id_; |
| 99 | 101 |
| 100 static BrowserGpuChannelHostFactory* instance_; | 102 static BrowserGpuChannelHostFactory* instance_; |
| 101 | 103 |
| 102 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); | 104 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); |
| 103 }; | 105 }; |
| 104 | 106 |
| 105 } // namespace content | 107 } // namespace content |
| 106 | 108 |
| 107 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 109 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
| OLD | NEW |