| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/plugin/npobject_proxy.h" | 5 #include "chrome/plugin/npobject_proxy.h" |
| 6 | 6 |
| 7 #include "chrome/common/plugin_messages.h" | 7 #include "chrome/common/plugin_messages.h" |
| 8 #include "chrome/plugin/npobject_util.h" | 8 #include "chrome/plugin/npobject_util.h" |
| 9 #include "chrome/plugin/plugin_channel.h" | 9 #include "chrome/plugin/plugin_channel.h" |
| 10 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 NPObject* NPObjectProxy::NPAllocate(NPP, NPClass*) { | 97 NPObject* NPObjectProxy::NPAllocate(NPP, NPClass*) { |
| 98 return reinterpret_cast<NPObject*>(new NPObjectWrapper); | 98 return reinterpret_cast<NPObject*>(new NPObjectWrapper); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void NPObjectProxy::NPDeallocate(NPObject* npObj) { | 101 void NPObjectProxy::NPDeallocate(NPObject* npObj) { |
| 102 NPObjectWrapper* obj = reinterpret_cast<NPObjectWrapper*>(npObj); | 102 NPObjectWrapper* obj = reinterpret_cast<NPObjectWrapper*>(npObj); |
| 103 delete obj->proxy; | 103 delete obj->proxy; |
| 104 delete obj; | 104 delete obj; |
| 105 } | 105 } |
| 106 | 106 |
| 107 void NPObjectProxy::OnMessageReceived(const IPC::Message& msg) { | 107 bool NPObjectProxy::OnMessageReceived(const IPC::Message& msg) { |
| 108 NOTREACHED(); | 108 NOTREACHED(); |
| 109 return false; |
| 109 } | 110 } |
| 110 | 111 |
| 111 void NPObjectProxy::OnChannelError() { | 112 void NPObjectProxy::OnChannelError() { |
| 112 // Release our ref count of the plugin channel object, as it addrefs the | 113 // Release our ref count of the plugin channel object, as it addrefs the |
| 113 // process. | 114 // process. |
| 114 channel_ = NULL; | 115 channel_ = NULL; |
| 115 } | 116 } |
| 116 | 117 |
| 117 bool NPObjectProxy::NPHasMethod(NPObject *obj, | 118 bool NPObjectProxy::NPHasMethod(NPObject *obj, |
| 118 NPIdentifier name) { | 119 NPIdentifier name) { |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 proxy->Send(msg); | 491 proxy->Send(msg); |
| 491 // Send may delete proxy. | 492 // Send may delete proxy. |
| 492 proxy = NULL; | 493 proxy = NULL; |
| 493 if (!result) | 494 if (!result) |
| 494 return false; | 495 return false; |
| 495 | 496 |
| 496 CreateNPVariant( | 497 CreateNPVariant( |
| 497 result_param, channel.get(), result_var, containing_window, page_url); | 498 result_param, channel.get(), result_var, containing_window, page_url); |
| 498 return true; | 499 return true; |
| 499 } | 500 } |
| OLD | NEW |