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/pepper/pepper_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 view_data_.is_page_visible = !render_frame_->GetRenderWidget()->is_hidden(); | 541 view_data_.is_page_visible = !render_frame_->GetRenderWidget()->is_hidden(); |
542 | 542 |
543 // Set the initial focus. | 543 // Set the initial focus. |
544 SetContentAreaFocus(render_frame_->GetRenderWidget()->has_focus()); | 544 SetContentAreaFocus(render_frame_->GetRenderWidget()->has_focus()); |
545 | 545 |
546 if (!module_->IsProxied()) { | 546 if (!module_->IsProxied()) { |
547 PepperBrowserConnection* browser_connection = | 547 PepperBrowserConnection* browser_connection = |
548 PepperBrowserConnection::Get(render_frame_); | 548 PepperBrowserConnection::Get(render_frame_); |
549 browser_connection->DidCreateInProcessInstance( | 549 browser_connection->DidCreateInProcessInstance( |
550 pp_instance(), | 550 pp_instance(), |
551 render_frame_->render_view()->GetRoutingID(), | 551 render_frame_->GetRoutingID(), |
552 container_->element().document().url(), | 552 container_->element().document().url(), |
553 GetPluginURL()); | 553 GetPluginURL()); |
554 } | 554 } |
555 } | 555 } |
556 | 556 |
557 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); | 557 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); |
558 resource_creation_ = host_impl->CreateInProcessResourceCreationAPI(this); | 558 resource_creation_ = host_impl->CreateInProcessResourceCreationAPI(this); |
559 | 559 |
560 if (GetContentClient()->renderer() && // NULL in unit tests. | 560 if (GetContentClient()->renderer() && // NULL in unit tests. |
561 GetContentClient()->renderer()->IsExternalPepperPlugin(module->name())) | 561 GetContentClient()->renderer()->IsExternalPepperPlugin(module->name())) |
(...skipping 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3075 // Running out-of-process. Initiate an IPC call to notify the plugin | 3075 // Running out-of-process. Initiate an IPC call to notify the plugin |
3076 // process. | 3076 // process. |
3077 ppapi::proxy::HostDispatcher* dispatcher = | 3077 ppapi::proxy::HostDispatcher* dispatcher = |
3078 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3078 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
3079 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3079 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
3080 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3080 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
3081 } | 3081 } |
3082 } | 3082 } |
3083 | 3083 |
3084 } // namespace content | 3084 } // namespace content |
OLD | NEW |