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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 15941006: Track NPObject ownership by the originating plugins' NPP identifier. [2/3] (Chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CppBoundClass. Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppapi_webplugin_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 9368e294d9cb92ddb5de4f20daa88ed75e2efb28..4f7f05071ad0e2bbd730e614e77f84333f8d6b27 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -437,17 +437,16 @@ PluginInstance::PluginInstance(
selection_anchor_(0),
pending_user_gesture_(0.0),
document_loader_(NULL),
- nacl_document_load_(false) {
+ nacl_document_load_(false),
+ npp_(new NPP_t) {
pp_instance_ = HostGlobals::Get()->AddInstance(this);
memset(&current_print_settings_, 0, sizeof(current_print_settings_));
DCHECK(delegate);
module_->InstanceCreated(this);
delegate_->InstanceCreated(this);
- message_channel_.reset(new MessageChannel(this));
view_data_.is_page_visible = delegate->IsPageVisible();
-
resource_creation_ = delegate_->CreateResourceCreationAPI(this);
// TODO(bbudge) remove this when the trusted NaCl plugin has been removed.
@@ -634,6 +633,8 @@ static void SetGPUHistogram(const ::ppapi::Preferences& prefs,
bool PluginInstance::Initialize(const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
bool full_frame) {
+ message_channel_.reset(new MessageChannel(this));
+
full_frame_ = full_frame;
UpdateTouchEventRequest();
@@ -2545,6 +2546,10 @@ bool PluginInstance::IsValidInstanceOf(PluginModule* module) {
module == original_module_.get();
}
+NPP PluginInstance::instanceNPP() {
+ return npp_.get();
+}
+
void PluginInstance::DoSetCursor(WebCursorInfo* cursor) {
cursor_.reset(cursor);
if (fullscreen_container_) {
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppapi_webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698