| 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 ? GURL(container->element().document().url()) |
| 483 : GURL()), |
| 482 is_flash_plugin_(module->name() == kFlashPluginName), | 484 is_flash_plugin_(module->name() == kFlashPluginName), |
| 483 has_been_clicked_(false), | 485 has_been_clicked_(false), |
| 484 javascript_used_(false), | 486 javascript_used_(false), |
| 485 full_frame_(false), | 487 full_frame_(false), |
| 486 sent_initial_did_change_view_(false), | 488 sent_initial_did_change_view_(false), |
| 487 bound_graphics_2d_platform_(NULL), | 489 bound_graphics_2d_platform_(NULL), |
| 488 bound_compositor_(NULL), | 490 bound_compositor_(NULL), |
| 489 has_webkit_focus_(false), | 491 has_webkit_focus_(false), |
| 490 has_content_area_focus_(false), | 492 has_content_area_focus_(false), |
| 491 find_identifier_(-1), | 493 find_identifier_(-1), |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 | 559 |
| 558 // Set the initial focus. | 560 // Set the initial focus. |
| 559 SetContentAreaFocus(render_frame_->GetRenderWidget()->has_focus()); | 561 SetContentAreaFocus(render_frame_->GetRenderWidget()->has_focus()); |
| 560 | 562 |
| 561 if (!module_->IsProxied()) { | 563 if (!module_->IsProxied()) { |
| 562 PepperBrowserConnection* browser_connection = | 564 PepperBrowserConnection* browser_connection = |
| 563 PepperBrowserConnection::Get(render_frame_); | 565 PepperBrowserConnection::Get(render_frame_); |
| 564 browser_connection->DidCreateInProcessInstance( | 566 browser_connection->DidCreateInProcessInstance( |
| 565 pp_instance(), | 567 pp_instance(), |
| 566 render_frame_->GetRoutingID(), | 568 render_frame_->GetRoutingID(), |
| 567 container_->element().document().url(), | 569 document_url_, |
| 568 GetPluginURL()); | 570 GetPluginURL()); |
| 569 } | 571 } |
| 570 } | 572 } |
| 571 | 573 |
| 572 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); | 574 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); |
| 573 resource_creation_ = host_impl->CreateInProcessResourceCreationAPI(this); | 575 resource_creation_ = host_impl->CreateInProcessResourceCreationAPI(this); |
| 574 | 576 |
| 575 if (GetContentClient()->renderer() && // NULL in unit tests. | 577 if (GetContentClient()->renderer() && // NULL in unit tests. |
| 576 GetContentClient()->renderer()->IsExternalPepperPlugin(module->name())) | 578 GetContentClient()->renderer()->IsExternalPepperPlugin(module->name())) |
| 577 external_document_load_ = true; | 579 external_document_load_ = true; |
| (...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3320 | 3322 |
| 3321 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { | 3323 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { |
| 3322 if (initialized_ && !javascript_used_ && is_flash_plugin_) { | 3324 if (initialized_ && !javascript_used_ && is_flash_plugin_) { |
| 3323 javascript_used_ = true; | 3325 javascript_used_ = true; |
| 3324 RenderThread::Get()->RecordAction( | 3326 RenderThread::Get()->RecordAction( |
| 3325 base::UserMetricsAction("Flash.JavaScriptUsed")); | 3327 base::UserMetricsAction("Flash.JavaScriptUsed")); |
| 3326 } | 3328 } |
| 3327 } | 3329 } |
| 3328 | 3330 |
| 3329 } // namespace content | 3331 } // namespace content |
| OLD | NEW |