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

Side by Side Diff: content/renderer/browser_plugin/old/guest_to_embedder_channel.cc

Issue 10695133: Improve GPU process URL crash reporting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/renderer/browser_plugin/old/guest_to_embedder_channel.h" 5 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h"
6 6
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "content/common/browser_plugin_messages.h" 8 #include "content/common/browser_plugin_messages.h"
9 #include "content/common/child_process.h" 9 #include "content/common/child_process.h"
10 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h" 10 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h"
11 #include "content/renderer/browser_plugin/old/browser_plugin_var_serialization_r ules.h" 11 #include "content/renderer/browser_plugin/old/browser_plugin_var_serialization_r ules.h"
12 #include "content/renderer/render_thread_impl.h" 12 #include "content/renderer/render_thread_impl.h"
13 #include "content/renderer/render_view_impl.h" 13 #include "content/renderer/render_view_impl.h"
14 #include "ppapi/c/pp_bool.h" 14 #include "ppapi/c/pp_bool.h"
15 #include "ppapi/c/pp_graphics_3d.h" 15 #include "ppapi/c/pp_graphics_3d.h"
16 #include "ppapi/proxy/ppapi_command_buffer_proxy.h" 16 #include "ppapi/proxy/ppapi_command_buffer_proxy.h"
17 #include "ppapi/proxy/ppapi_messages.h" 17 #include "ppapi/proxy/ppapi_messages.h"
18 #include "ppapi/shared_impl/api_id.h" 18 #include "ppapi/shared_impl/api_id.h"
19 #include "ppapi/shared_impl/ppapi_globals.h" 19 #include "ppapi/shared_impl/ppapi_globals.h"
20 #include "ppapi/shared_impl/var.h" 20 #include "ppapi/shared_impl/var.h"
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
21 #include "webkit/plugins/ppapi/event_conversion.h" 23 #include "webkit/plugins/ppapi/event_conversion.h"
22 24
23 namespace content { 25 namespace content {
24 26
25 GuestToEmbedderChannel::GuestToEmbedderChannel( 27 GuestToEmbedderChannel::GuestToEmbedderChannel(
26 const std::string& embedder_channel_name, 28 const std::string& embedder_channel_name,
27 const IPC::ChannelHandle& embedder_channel_handle) 29 const IPC::ChannelHandle& embedder_channel_handle)
28 : Dispatcher(NULL), 30 : Dispatcher(NULL),
29 embedder_channel_name_(embedder_channel_name), 31 embedder_channel_name_(embedder_channel_name),
30 embedder_channel_handle_(embedder_channel_handle) { 32 embedder_channel_handle_(embedder_channel_handle) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 88
87 bool GuestToEmbedderChannel::IsPlugin() const { 89 bool GuestToEmbedderChannel::IsPlugin() const {
88 return true; 90 return true;
89 } 91 }
90 92
91 WebGraphicsContext3DCommandBufferImpl* 93 WebGraphicsContext3DCommandBufferImpl*
92 GuestToEmbedderChannel::CreateWebGraphicsContext3D( 94 GuestToEmbedderChannel::CreateWebGraphicsContext3D(
93 RenderViewImpl* render_view, 95 RenderViewImpl* render_view,
94 const WebKit::WebGraphicsContext3D::Attributes& attributes, 96 const WebKit::WebGraphicsContext3D::Attributes& attributes,
95 bool offscreen) { 97 bool offscreen) {
98 GURL url;
99 if (render_view->webview()->mainFrame())
Ken Russell (switch to Gerrit) 2012/07/10 23:38:01 Under what conditions would this not be the case?
jbates 2012/07/11 00:07:18 Not sure, this was copied from render_view_impl.cc
100 url = GURL(render_view->webview()->mainFrame()->document().url());
96 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( 101 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
97 new WebGraphicsContext3DCommandBufferImpl( 102 new WebGraphicsContext3DCommandBufferImpl(
98 0, GURL(), NULL, 103 0, url, NULL,
99 render_view->AsWeakPtr())); 104 render_view->AsWeakPtr()));
100 105
101 // Special case: RenderView initialization has not yet completed. 106 // Special case: RenderView initialization has not yet completed.
102 if (!render_view->guest_pp_instance()) 107 if (!render_view->guest_pp_instance())
103 return context.release(); 108 return context.release();
104 109
105 if (CreateGraphicsContext(context.get(), 110 if (CreateGraphicsContext(context.get(),
106 attributes, 111 attributes,
107 offscreen, 112 offscreen,
108 render_view)) 113 render_view))
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 render_view->GetWebView()->loseCompositorContext(1); 302 render_view->GetWebView()->loseCompositorContext(1);
298 } 303 }
299 304
300 void GuestToEmbedderChannel::OnGuestReady(PP_Instance instance, 305 void GuestToEmbedderChannel::OnGuestReady(PP_Instance instance,
301 int embedder_container_id) { 306 int embedder_container_id) {
302 RenderThreadImpl::current()->browser_plugin_channel_manager()-> 307 RenderThreadImpl::current()->browser_plugin_channel_manager()->
303 GuestReady(instance, embedder_channel_name(), embedder_container_id); 308 GuestReady(instance, embedder_channel_name(), embedder_container_id);
304 } 309 }
305 310
306 } // namespace content 311 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698