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

Side by Side Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 8595002: Get rid of gpu_messages.h include in chrome by having the RenderWidgetHostView implementation ask... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix aura/views build Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 5 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 bool GpuProcessHostUIShim::OnMessageReceived(const IPC::Message& message) { 141 bool GpuProcessHostUIShim::OnMessageReceived(const IPC::Message& message) {
142 DCHECK(CalledOnValidThread()); 142 DCHECK(CalledOnValidThread());
143 143
144 if (message.routing_id() != MSG_ROUTING_CONTROL) 144 if (message.routing_id() != MSG_ROUTING_CONTROL)
145 return false; 145 return false;
146 146
147 return OnControlMessageReceived(message); 147 return OnControlMessageReceived(message);
148 } 148 }
149 149
150 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
151
152 void GpuProcessHostUIShim::SendToGpuHost(int host_id, IPC::Message* msg) {
153 GpuProcessHostUIShim* ui_shim = FromID(host_id);
154 if (!ui_shim) {
155 delete msg;
156 return;
157 }
158
159 ui_shim->Send(msg);
160 }
161
162 #endif
163
164 GpuProcessHostUIShim::~GpuProcessHostUIShim() { 150 GpuProcessHostUIShim::~GpuProcessHostUIShim() {
165 DCHECK(CalledOnValidThread()); 151 DCHECK(CalledOnValidThread());
166 g_hosts_by_id.Pointer()->Remove(host_id_); 152 g_hosts_by_id.Pointer()->Remove(host_id_);
167 } 153 }
168 154
169 bool GpuProcessHostUIShim::OnControlMessageReceived( 155 bool GpuProcessHostUIShim::OnControlMessageReceived(
170 const IPC::Message& message) { 156 const IPC::Message& message) {
171 DCHECK(CalledOnValidThread()); 157 DCHECK(CalledOnValidThread());
172 158
173 IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message) 159 IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message)
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 params.render_view_id); 346 params.render_view_id);
361 if (!host) 347 if (!host)
362 return; 348 return;
363 RenderWidgetHostView* view = host->view(); 349 RenderWidgetHostView* view = host->view();
364 if (!view) 350 if (!view)
365 return; 351 return;
366 view->AcceleratedSurfaceRelease(params.identifier); 352 view->AcceleratedSurfaceRelease(params.identifier);
367 } 353 }
368 354
369 #endif 355 #endif
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.h ('k') | content/browser/renderer_host/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698