| OLD | NEW | 
|    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/guest_to_embedder_channel.h" |    5 #include "content/renderer/browser_plugin/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/browser_plugin_channel_manager.h" |   10 #include "content/renderer/browser_plugin/browser_plugin_channel_manager.h" | 
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  161     RenderViewImpl* render_view) { |  161     RenderViewImpl* render_view) { | 
|  162   std::vector<int32_t> attribs; |  162   std::vector<int32_t> attribs; | 
|  163   attribs.push_back(PP_GRAPHICS3DATTRIB_NONE); |  163   attribs.push_back(PP_GRAPHICS3DATTRIB_NONE); | 
|  164  |  164  | 
|  165   ppapi::HostResource resource; |  165   ppapi::HostResource resource; | 
|  166   DCHECK(render_view->guest_pp_instance()); |  166   DCHECK(render_view->guest_pp_instance()); | 
|  167   // TODO(fsamuel): Support shared contexts. |  167   // TODO(fsamuel): Support shared contexts. | 
|  168   bool success = Send(new PpapiHostMsg_PPBGraphics3D_Create( |  168   bool success = Send(new PpapiHostMsg_PPBGraphics3D_Create( | 
|  169       ppapi::API_ID_PPB_GRAPHICS_3D, |  169       ppapi::API_ID_PPB_GRAPHICS_3D, | 
|  170       render_view->guest_pp_instance(), |  170       render_view->guest_pp_instance(), | 
 |  171       ppapi::HostResource(), | 
|  171       attribs, |  172       attribs, | 
|  172       &resource)); |  173       &resource)); | 
|  173   if (!success || resource.is_null()) |  174   if (!success || resource.is_null()) | 
|  174     return false; |  175     return false; | 
|  175   if (!offscreen) { |  176   if (!offscreen) { | 
|  176     PP_Bool result = PP_FALSE; |  177     PP_Bool result = PP_FALSE; | 
|  177     Send(new PpapiHostMsg_PPBInstance_BindGraphics( |  178     Send(new PpapiHostMsg_PPBInstance_BindGraphics( | 
|  178             ppapi::API_ID_PPB_INSTANCE, |  179             ppapi::API_ID_PPB_INSTANCE, | 
|  179             render_view->guest_pp_instance(), |  180             render_view->guest_pp_instance(), | 
|  180             resource, |  181             resource, | 
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  292   render_view->GetWebView()->loseCompositorContext(1); |  293   render_view->GetWebView()->loseCompositorContext(1); | 
|  293 } |  294 } | 
|  294  |  295  | 
|  295 void GuestToEmbedderChannel::OnGuestReady(PP_Instance instance, |  296 void GuestToEmbedderChannel::OnGuestReady(PP_Instance instance, | 
|  296                                           int embedder_container_id) { |  297                                           int embedder_container_id) { | 
|  297   RenderThreadImpl::current()->browser_plugin_channel_manager()-> |  298   RenderThreadImpl::current()->browser_plugin_channel_manager()-> | 
|  298       GuestReady(instance, embedder_channel_name(), embedder_container_id); |  299       GuestReady(instance, embedder_channel_name(), embedder_container_id); | 
|  299 } |  300 } | 
|  300  |  301  | 
|  301 }  // namespace content |  302 }  // namespace content | 
| OLD | NEW |