| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 static BrowserGpuChannelHostFactory* instance() { return instance_; } | 29 static BrowserGpuChannelHostFactory* instance() { return instance_; } |
| 30 | 30 |
| 31 // Overridden from GpuChannelHostFactory: | 31 // Overridden from GpuChannelHostFactory: |
| 32 bool IsMainThread() override; | 32 bool IsMainThread() override; |
| 33 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; | 33 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; |
| 34 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; | 34 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; |
| 35 | 35 |
| 36 int GpuProcessHostId() { return gpu_host_id_; } | 36 int GpuProcessHostId() { return gpu_host_id_; } |
| 37 #if !defined(OS_ANDROID) | 37 #if !defined(OS_ANDROID) |
| 38 GpuChannelHost* EstablishGpuChannelSync( | 38 GpuChannelHost* EstablishGpuChannelSync( |
| 39 CauseForGpuLaunch cause_for_gpu_launch); | 39 gpu::CauseForGpuLaunch cause_for_gpu_launch); |
| 40 #endif | 40 #endif |
| 41 void EstablishGpuChannel(CauseForGpuLaunch cause_for_gpu_launch, | 41 void EstablishGpuChannel(gpu::CauseForGpuLaunch cause_for_gpu_launch, |
| 42 const base::Closure& callback); | 42 const base::Closure& callback); |
| 43 GpuChannelHost* GetGpuChannel(); | 43 GpuChannelHost* GetGpuChannel(); |
| 44 int GetGpuChannelId() { return gpu_client_id_; } | 44 int GetGpuChannelId() { return gpu_client_id_; } |
| 45 | 45 |
| 46 // Used to skip GpuChannelHost tests when there can be no GPU process. | 46 // Used to skip GpuChannelHost tests when there can be no GPU process. |
| 47 static bool CanUseForTesting(); | 47 static bool CanUseForTesting(); |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 struct CreateRequest; | 50 struct CreateRequest; |
| 51 class EstablishRequest; | 51 class EstablishRequest; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 70 std::vector<base::Closure> established_callbacks_; | 70 std::vector<base::Closure> established_callbacks_; |
| 71 | 71 |
| 72 static BrowserGpuChannelHostFactory* instance_; | 72 static BrowserGpuChannelHostFactory* instance_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); | 74 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace content | 77 } // namespace content |
| 78 | 78 |
| 79 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 79 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
| OLD | NEW |