| 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/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 // calls move entirely from RenderViewImpl in to RenderFrameImpl, this | 536 // calls move entirely from RenderViewImpl in to RenderFrameImpl, this |
| 537 // can be a little bit simplified by instead making a direct call on | 537 // can be a little bit simplified by instead making a direct call on |
| 538 // RenderFrameImpl in the destructor (but only if render_frame_ is valid). | 538 // RenderFrameImpl in the destructor (but only if render_frame_ is valid). |
| 539 instance_deleted_callback_ = | 539 instance_deleted_callback_ = |
| 540 base::Bind(&RenderViewImpl::PepperInstanceDeleted, | 540 base::Bind(&RenderViewImpl::PepperInstanceDeleted, |
| 541 render_frame->render_view()->AsWeakPtr(), | 541 render_frame->render_view()->AsWeakPtr(), |
| 542 base::Unretained(this)); | 542 base::Unretained(this)); |
| 543 view_data_.is_page_visible = !render_frame_->GetRenderWidget()->is_hidden(); | 543 view_data_.is_page_visible = !render_frame_->GetRenderWidget()->is_hidden(); |
| 544 | 544 |
| 545 // Set the initial focus. | 545 // Set the initial focus. |
| 546 SetContentAreaFocus(render_frame_->GetRenderWidget()->has_focus()); | 546 SetContentAreaFocus(render_frame_->render_view()->has_focus()); |
| 547 | 547 |
| 548 if (!module_->IsProxied()) { | 548 if (!module_->IsProxied()) { |
| 549 PepperBrowserConnection* browser_connection = | 549 PepperBrowserConnection* browser_connection = |
| 550 PepperBrowserConnection::Get(render_frame_); | 550 PepperBrowserConnection::Get(render_frame_); |
| 551 browser_connection->DidCreateInProcessInstance( | 551 browser_connection->DidCreateInProcessInstance( |
| 552 pp_instance(), | 552 pp_instance(), |
| 553 render_frame_->GetRoutingID(), | 553 render_frame_->GetRoutingID(), |
| 554 document_url_, | 554 document_url_, |
| 555 GetPluginURL()); | 555 GetPluginURL()); |
| 556 } | 556 } |
| (...skipping 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3274 | 3274 |
| 3275 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { | 3275 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { |
| 3276 if (initialized_ && !javascript_used_ && is_flash_plugin_) { | 3276 if (initialized_ && !javascript_used_ && is_flash_plugin_) { |
| 3277 javascript_used_ = true; | 3277 javascript_used_ = true; |
| 3278 RenderThread::Get()->RecordAction( | 3278 RenderThread::Get()->RecordAction( |
| 3279 base::UserMetricsAction("Flash.JavaScriptUsed")); | 3279 base::UserMetricsAction("Flash.JavaScriptUsed")); |
| 3280 } | 3280 } |
| 3281 } | 3281 } |
| 3282 | 3282 |
| 3283 } // namespace content | 3283 } // namespace content |
| OLD | NEW |