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

Side by Side Diff: content/browser/gpu/browser_gpu_channel_host_factory.h

Issue 245443005: Move IPC::MessageFilter and router to a separate file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix gn build Created 6 years, 8 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 | Annotate | Revision Log
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 <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/process/process.h" 12 #include "base/process/process.h"
13 #include "base/synchronization/waitable_event.h" 13 #include "base/synchronization/waitable_event.h"
14 #include "content/common/gpu/client/gpu_channel_host.h" 14 #include "content/common/gpu/client/gpu_channel_host.h"
15 #include "ipc/ipc_channel_handle.h" 15 #include "ipc/ipc_channel_handle.h"
16 #include "ipc/message_filter.h"
16 17
17 namespace content { 18 namespace content {
18 19
19 class CONTENT_EXPORT BrowserGpuChannelHostFactory 20 class CONTENT_EXPORT BrowserGpuChannelHostFactory
20 : public GpuChannelHostFactory { 21 : public GpuChannelHostFactory {
21 public: 22 public:
22 static void Initialize(bool establish_gpu_channel); 23 static void Initialize(bool establish_gpu_channel);
23 static void Terminate(); 24 static void Terminate();
24 static BrowserGpuChannelHostFactory* instance() { return instance_; } 25 static BrowserGpuChannelHostFactory* instance() { return instance_; }
25 26
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 static void CommandBufferCreatedOnIO(CreateRequest* request, bool succeeded); 116 static void CommandBufferCreatedOnIO(CreateRequest* request, bool succeeded);
116 void CreateImageOnIO( 117 void CreateImageOnIO(
117 gfx::PluginWindowHandle window, 118 gfx::PluginWindowHandle window,
118 int32 image_id, 119 int32 image_id,
119 const CreateImageCallback& callback); 120 const CreateImageCallback& callback);
120 static void ImageCreatedOnIO( 121 static void ImageCreatedOnIO(
121 const CreateImageCallback& callback, const gfx::Size size); 122 const CreateImageCallback& callback, const gfx::Size size);
122 static void OnImageCreated( 123 static void OnImageCreated(
123 const CreateImageCallback& callback, const gfx::Size size); 124 const CreateImageCallback& callback, const gfx::Size size);
124 void DeleteImageOnIO(int32 image_id, int32 sync_point); 125 void DeleteImageOnIO(int32 image_id, int32 sync_point);
125 static void AddFilterOnIO( 126 static void AddFilterOnIO(int gpu_host_id,
126 int gpu_host_id, 127 scoped_refptr<IPC::MessageFilter> filter);
127 scoped_refptr<IPC::ChannelProxy::MessageFilter> filter);
128 128
129 const int gpu_client_id_; 129 const int gpu_client_id_;
130 scoped_ptr<base::WaitableEvent> shutdown_event_; 130 scoped_ptr<base::WaitableEvent> shutdown_event_;
131 scoped_refptr<GpuChannelHost> gpu_channel_; 131 scoped_refptr<GpuChannelHost> gpu_channel_;
132 int gpu_host_id_; 132 int gpu_host_id_;
133 scoped_refptr<EstablishRequest> pending_request_; 133 scoped_refptr<EstablishRequest> pending_request_;
134 std::vector<base::Closure> established_callbacks_; 134 std::vector<base::Closure> established_callbacks_;
135 135
136 static BrowserGpuChannelHostFactory* instance_; 136 static BrowserGpuChannelHostFactory* instance_;
137 137
138 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); 138 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory);
139 }; 139 };
140 140
141 } // namespace content 141 } // namespace content
142 142
143 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 143 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
OLDNEW
« no previous file with comments | « components/tracing/child_trace_message_filter.cc ('k') | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698