| 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 26 matching lines...) Expand all Loading... |
| 37 size_t size) override; | 37 size_t size) override; |
| 38 | 38 |
| 39 int GpuProcessHostId() { return gpu_host_id_; } | 39 int GpuProcessHostId() { return gpu_host_id_; } |
| 40 gpu::GpuChannelHost* GetGpuChannel(); | 40 gpu::GpuChannelHost* GetGpuChannel(); |
| 41 int GetGpuChannelId() { return gpu_client_id_; } | 41 int GetGpuChannelId() { return gpu_client_id_; } |
| 42 | 42 |
| 43 // Used to skip GpuChannelHost tests when there can be no GPU process. | 43 // Used to skip GpuChannelHost tests when there can be no GPU process. |
| 44 static bool CanUseForTesting(); | 44 static bool CanUseForTesting(); |
| 45 | 45 |
| 46 // Overridden from gpu::GpuChannelEstablishFactory: | 46 // Overridden from gpu::GpuChannelEstablishFactory: |
| 47 // The factory will return a null GpuChannelHost in the callback during |
| 48 // shutdown. |
| 47 void EstablishGpuChannel( | 49 void EstablishGpuChannel( |
| 48 const gpu::GpuChannelEstablishedCallback& callback) override; | 50 const gpu::GpuChannelEstablishedCallback& callback) override; |
| 49 scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override; | 51 scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override; |
| 50 | 52 |
| 51 private: | 53 private: |
| 52 struct CreateRequest; | 54 struct CreateRequest; |
| 53 class EstablishRequest; | 55 class EstablishRequest; |
| 54 | 56 |
| 55 BrowserGpuChannelHostFactory(); | 57 BrowserGpuChannelHostFactory(); |
| 56 ~BrowserGpuChannelHostFactory() override; | 58 ~BrowserGpuChannelHostFactory() override; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 72 std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks_; | 74 std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks_; |
| 73 | 75 |
| 74 static BrowserGpuChannelHostFactory* instance_; | 76 static BrowserGpuChannelHostFactory* instance_; |
| 75 | 77 |
| 76 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); | 78 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 } // namespace content | 81 } // namespace content |
| 80 | 82 |
| 81 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 83 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
| OLD | NEW |