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

Side by Side Diff: content/browser/gpu/browser_gpu_channel_host_factory.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
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 static BrowserGpuChannelHostFactory* instance() { return instance_; } 24 static BrowserGpuChannelHostFactory* instance() { return instance_; }
25 25
26 // Overridden from GpuChannelHostFactory: 26 // Overridden from GpuChannelHostFactory:
27 bool IsMainThread() override; 27 bool IsMainThread() override;
28 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; 28 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
29 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; 29 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override;
30 CreateCommandBufferResult CreateViewCommandBuffer( 30 CreateCommandBufferResult CreateViewCommandBuffer(
31 int32 surface_id, 31 int32 surface_id,
32 const GPUCreateCommandBufferConfig& init_params, 32 const GPUCreateCommandBufferConfig& init_params,
33 int32 route_id) override; 33 int32 route_id) override;
34 IPC::AttachmentBroker* GetAttachmentBroker() override;
35 34
36 int GpuProcessHostId() { return gpu_host_id_; } 35 int GpuProcessHostId() { return gpu_host_id_; }
37 #if !defined(OS_ANDROID) 36 #if !defined(OS_ANDROID)
38 GpuChannelHost* EstablishGpuChannelSync( 37 GpuChannelHost* EstablishGpuChannelSync(
39 CauseForGpuLaunch cause_for_gpu_launch); 38 CauseForGpuLaunch cause_for_gpu_launch);
40 #endif 39 #endif
41 void EstablishGpuChannel(CauseForGpuLaunch cause_for_gpu_launch, 40 void EstablishGpuChannel(CauseForGpuLaunch cause_for_gpu_launch,
42 const base::Closure& callback); 41 const base::Closure& callback);
43 GpuChannelHost* GetGpuChannel(); 42 GpuChannelHost* GetGpuChannel();
44 int GetGpuChannelId() { return gpu_client_id_; } 43 int GetGpuChannelId() { return gpu_client_id_; }
(...skipping 30 matching lines...) Expand all
75 std::vector<base::Closure> established_callbacks_; 74 std::vector<base::Closure> established_callbacks_;
76 75
77 static BrowserGpuChannelHostFactory* instance_; 76 static BrowserGpuChannelHostFactory* instance_;
78 77
79 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); 78 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory);
80 }; 79 };
81 80
82 } // namespace content 81 } // namespace content
83 82
84 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 83 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698