Index: content/common/gpu/client/gpu_channel_host_factory.h |
diff --git a/content/common/gpu/client/gpu_channel_host_factory.h b/content/common/gpu/client/gpu_channel_host_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c6f8c6dc3902694e6e877b384a94bf330641ff3e |
--- /dev/null |
+++ b/content/common/gpu/client/gpu_channel_host_factory.h |
@@ -0,0 +1,35 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_FACTORY_H_ |
+#define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_FACTORY_H_ |
+ |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/memory/shared_memory.h" |
+#include "base/single_thread_task_runner.h" |
+#include "content/common/content_export.h" |
+#include "content/common/gpu/gpu_result_codes.h" |
+ |
+namespace content { |
+ |
+struct GpuCreateCommandBufferConfig; |
+ |
+class CONTENT_EXPORT GpuChannelHostFactory { |
+ public: |
+ virtual ~GpuChannelHostFactory() {} |
+ |
+ virtual bool IsMainThread() = 0; |
+ virtual scoped_refptr<base::SingleThreadTaskRunner> |
+ GetIOThreadTaskRunner() = 0; |
+ virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; |
+ virtual CreateCommandBufferResult CreateViewCommandBuffer( |
+ int32_t surface_id, |
+ const GpuCreateCommandBufferConfig& init_params, |
+ int32_t route_id) = 0; |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_FACTORY_H_ |