Chromium Code Reviews| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 472 const GURL& plugin_url) | 472 const GURL& plugin_url) |
| 473 : RenderFrameObserver(render_frame), | 473 : RenderFrameObserver(render_frame), |
| 474 render_frame_(render_frame), | 474 render_frame_(render_frame), |
| 475 module_(module), | 475 module_(module), |
| 476 instance_interface_(instance_interface), | 476 instance_interface_(instance_interface), |
| 477 pp_instance_(0), | 477 pp_instance_(0), |
| 478 container_(container), | 478 container_(container), |
| 479 layer_bound_to_fullscreen_(false), | 479 layer_bound_to_fullscreen_(false), |
| 480 layer_is_hardware_(false), | 480 layer_is_hardware_(false), |
| 481 plugin_url_(plugin_url), | 481 plugin_url_(plugin_url), |
| 482 document_url_(container ? container->element().document().url() : GURL()), | |
| 482 is_flash_plugin_(module->name() == kFlashPluginName), | 483 is_flash_plugin_(module->name() == kFlashPluginName), |
| 483 has_been_clicked_(false), | 484 has_been_clicked_(false), |
| 484 javascript_used_(false), | 485 javascript_used_(false), |
| 485 full_frame_(false), | 486 full_frame_(false), |
| 486 sent_initial_did_change_view_(false), | 487 sent_initial_did_change_view_(false), |
| 487 bound_graphics_2d_platform_(NULL), | 488 bound_graphics_2d_platform_(NULL), |
| 488 bound_compositor_(NULL), | 489 bound_compositor_(NULL), |
| 489 has_webkit_focus_(false), | 490 has_webkit_focus_(false), |
| 490 has_content_area_focus_(false), | 491 has_content_area_focus_(false), |
| 491 find_identifier_(-1), | 492 find_identifier_(-1), |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 557 | 558 |
| 558 // Set the initial focus. | 559 // Set the initial focus. |
| 559 SetContentAreaFocus(render_frame_->GetRenderWidget()->has_focus()); | 560 SetContentAreaFocus(render_frame_->GetRenderWidget()->has_focus()); |
| 560 | 561 |
| 561 if (!module_->IsProxied()) { | 562 if (!module_->IsProxied()) { |
| 562 PepperBrowserConnection* browser_connection = | 563 PepperBrowserConnection* browser_connection = |
| 563 PepperBrowserConnection::Get(render_frame_); | 564 PepperBrowserConnection::Get(render_frame_); |
| 564 browser_connection->DidCreateInProcessInstance( | 565 browser_connection->DidCreateInProcessInstance( |
| 565 pp_instance(), | 566 pp_instance(), |
| 566 render_frame_->GetRoutingID(), | 567 render_frame_->GetRoutingID(), |
| 567 container_->element().document().url(), | 568 container_->element().document().url(), |
|
bbudge
2015/03/18 21:02:36
You could use document_url_ here. The comment on l
dmichael (off chromium)
2015/03/18 21:57:23
Done, thanks.
| |
| 568 GetPluginURL()); | 569 GetPluginURL()); |
| 569 } | 570 } |
| 570 } | 571 } |
| 571 | 572 |
| 572 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); | 573 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); |
| 573 resource_creation_ = host_impl->CreateInProcessResourceCreationAPI(this); | 574 resource_creation_ = host_impl->CreateInProcessResourceCreationAPI(this); |
| 574 | 575 |
| 575 if (GetContentClient()->renderer() && // NULL in unit tests. | 576 if (GetContentClient()->renderer() && // NULL in unit tests. |
| 576 GetContentClient()->renderer()->IsExternalPepperPlugin(module->name())) | 577 GetContentClient()->renderer()->IsExternalPepperPlugin(module->name())) |
| 577 external_document_load_ = true; | 578 external_document_load_ = true; |
| (...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3320 | 3321 |
| 3321 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { | 3322 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { |
| 3322 if (initialized_ && !javascript_used_ && is_flash_plugin_) { | 3323 if (initialized_ && !javascript_used_ && is_flash_plugin_) { |
| 3323 javascript_used_ = true; | 3324 javascript_used_ = true; |
| 3324 RenderThread::Get()->RecordAction( | 3325 RenderThread::Get()->RecordAction( |
| 3325 base::UserMetricsAction("Flash.JavaScriptUsed")); | 3326 base::UserMetricsAction("Flash.JavaScriptUsed")); |
| 3326 } | 3327 } |
| 3327 } | 3328 } |
| 3328 | 3329 |
| 3329 } // namespace content | 3330 } // namespace content |
| OLD | NEW |