Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 1400003003: Move has_focus_ tracking from RenderWidget to RenderView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698