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

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

Issue 100943002: Convert PepperBrowserConnection to be a RenderFrameObserver. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fixes Created 7 years 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 | Annotate | Revision Log
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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 538
539 if (render_frame) { // NULL in tests 539 if (render_frame) { // NULL in tests
540 render_frame->PepperInstanceCreated(this); 540 render_frame->PepperInstanceCreated(this);
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_->render_view()); 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_->render_view()->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);
(...skipping 18 matching lines...) Expand all
577 delete *i; 577 delete *i;
578 578
579 if (TrackedCallback::IsPending(lock_mouse_callback_)) 579 if (TrackedCallback::IsPending(lock_mouse_callback_))
580 lock_mouse_callback_->Abort(); 580 lock_mouse_callback_->Abort();
581 581
582 if (render_frame_) 582 if (render_frame_)
583 render_frame_->PepperInstanceDeleted(this); 583 render_frame_->PepperInstanceDeleted(this);
584 584
585 if (!module_->IsProxied() && render_frame_) { 585 if (!module_->IsProxied() && render_frame_) {
586 PepperBrowserConnection* browser_connection = 586 PepperBrowserConnection* browser_connection =
587 PepperBrowserConnection::Get(render_frame_->render_view()); 587 PepperBrowserConnection::Get(render_frame_);
588 browser_connection->DidDeleteInProcessInstance(pp_instance()); 588 browser_connection->DidDeleteInProcessInstance(pp_instance());
589 } 589 }
590 590
591 UnSetAndDeleteLockTargetAdapter(); 591 UnSetAndDeleteLockTargetAdapter();
592 module_->InstanceDeleted(this); 592 module_->InstanceDeleted(this);
593 // If we switched from the NaCl plugin module, notify it too. 593 // If we switched from the NaCl plugin module, notify it too.
594 if (original_module_.get()) 594 if (original_module_.get())
595 original_module_->InstanceDeleted(this); 595 original_module_->InstanceDeleted(this);
596 596
597 // This should be last since some of the above "instance deleted" calls will 597 // This should be last since some of the above "instance deleted" calls will
(...skipping 2477 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_in_process_router.cc ('k') | content/renderer/pepper/renderer_ppapi_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698