Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: content/common/gpu/client/gpu_channel_host.h

Issue 1292263003: ipc: Use a global for the process's attachment broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_message2
Patch Set: Comments from avi. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/atomic_sequence_num.h" 11 #include "base/atomic_sequence_num.h"
12 #include "base/containers/scoped_ptr_hash_map.h" 12 #include "base/containers/scoped_ptr_hash_map.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/process/process.h" 16 #include "base/process/process.h"
17 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 #include "content/common/gpu/gpu_process_launch_causes.h" 19 #include "content/common/gpu/gpu_process_launch_causes.h"
20 #include "content/common/gpu/gpu_result_codes.h" 20 #include "content/common/gpu/gpu_result_codes.h"
21 #include "content/common/gpu/gpu_stream_priority.h" 21 #include "content/common/gpu/gpu_stream_priority.h"
22 #include "content/common/message_router.h" 22 #include "content/common/message_router.h"
23 #include "gpu/config/gpu_info.h" 23 #include "gpu/config/gpu_info.h"
24 #include "ipc/attachment_broker.h"
25 #include "ipc/ipc_channel_handle.h" 24 #include "ipc/ipc_channel_handle.h"
26 #include "ipc/ipc_sync_channel.h" 25 #include "ipc/ipc_sync_channel.h"
27 #include "ipc/message_filter.h" 26 #include "ipc/message_filter.h"
28 #include "media/video/jpeg_decode_accelerator.h" 27 #include "media/video/jpeg_decode_accelerator.h"
29 #include "ui/events/latency_info.h" 28 #include "ui/events/latency_info.h"
30 #include "ui/gfx/geometry/size.h" 29 #include "ui/gfx/geometry/size.h"
31 #include "ui/gfx/gpu_memory_buffer.h" 30 #include "ui/gfx/gpu_memory_buffer.h"
32 #include "ui/gfx/native_widget_types.h" 31 #include "ui/gfx/native_widget_types.h"
33 #include "ui/gl/gpu_preference.h" 32 #include "ui/gl/gpu_preference.h"
34 33
(...skipping 17 matching lines...) Expand all
52 } 51 }
53 52
54 namespace gpu { 53 namespace gpu {
55 class GpuMemoryBufferManager; 54 class GpuMemoryBufferManager;
56 } 55 }
57 56
58 namespace content { 57 namespace content {
59 class CommandBufferProxyImpl; 58 class CommandBufferProxyImpl;
60 class GpuChannelHost; 59 class GpuChannelHost;
61 60
62 class CONTENT_EXPORT GpuChannelHostFactory 61 class CONTENT_EXPORT GpuChannelHostFactory {
63 : virtual public IPC::SupportsAttachmentBrokering {
64 public: 62 public:
65 virtual ~GpuChannelHostFactory() {} 63 virtual ~GpuChannelHostFactory() {}
66 64
67 virtual bool IsMainThread() = 0; 65 virtual bool IsMainThread() = 0;
68 virtual scoped_refptr<base::SingleThreadTaskRunner> 66 virtual scoped_refptr<base::SingleThreadTaskRunner>
69 GetIOThreadTaskRunner() = 0; 67 GetIOThreadTaskRunner() = 0;
70 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; 68 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0;
71 virtual CreateCommandBufferResult CreateViewCommandBuffer( 69 virtual CreateCommandBufferResult CreateViewCommandBuffer(
72 int32 surface_id, 70 int32 surface_id,
73 const GPUCreateCommandBufferConfig& init_params, 71 const GPUCreateCommandBufferConfig& init_params,
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 mutable base::Lock context_lock_; 282 mutable base::Lock context_lock_;
285 scoped_ptr<IPC::SyncChannel> channel_; 283 scoped_ptr<IPC::SyncChannel> channel_;
286 base::hash_map<int32, StreamFlushInfo> stream_flush_info_; 284 base::hash_map<int32, StreamFlushInfo> stream_flush_info_;
287 285
288 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); 286 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost);
289 }; 287 };
290 288
291 } // namespace content 289 } // namespace content
292 290
293 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 291 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
OLDNEW
« no previous file with comments | « content/common/child_process_host_impl.cc ('k') | content/common/gpu/client/gpu_channel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698