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

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

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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 #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/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 surface_id, &render_process_id, &render_widget_id)) 83 surface_id, &render_process_id, &render_widget_id))
84 return NULL; 84 return NULL;
85 85
86 content::RenderProcessHost* process = 86 content::RenderProcessHost* process =
87 content::RenderProcessHost::FromID(render_process_id); 87 content::RenderProcessHost::FromID(render_process_id);
88 if (!process) 88 if (!process)
89 return NULL; 89 return NULL;
90 90
91 RenderWidgetHostImpl* host = static_cast<RenderWidgetHostImpl*>( 91 RenderWidgetHostImpl* host = static_cast<RenderWidgetHostImpl*>(
92 process->GetListenerByID(render_widget_id)); 92 process->GetListenerByID(render_widget_id));
93 return host ? RenderWidgetHostViewPort::FromRWHV(host->view()) : NULL; 93 return host ? RenderWidgetHostViewPort::FromRWHV(host->GetView()) : NULL;
94 } 94 }
95 95
96 } // namespace 96 } // namespace
97 97
98 void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg) { 98 void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg) {
99 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(host_id); 99 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(host_id);
100 if (ui_shim) 100 if (ui_shim)
101 ui_shim->OnMessageReceived(msg); 101 ui_shim->OnMessageReceived(msg);
102 } 102 }
103 103
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( 393 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease(
394 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { 394 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) {
395 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( 395 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID(
396 params.surface_id); 396 params.surface_id);
397 if (!view) 397 if (!view)
398 return; 398 return;
399 view->AcceleratedSurfaceRelease(params.identifier); 399 view->AcceleratedSurfaceRelease(params.identifier);
400 } 400 }
401 401
402 #endif 402 #endif
OLDNEW
« no previous file with comments | « content/browser/geolocation/geolocation_dispatcher_host.cc ('k') | content/browser/host_zoom_map_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698