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/browser_plugin/browser_plugin_bindings.h" | 5 #include "content/renderer/browser_plugin/browser_plugin_bindings.h" |
6 | 6 |
7 #include <cstdlib> | 7 #include <cstdlib> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 return true; | 275 return true; |
276 } | 276 } |
277 | 277 |
278 if (IdentifierIsStop(name) && !arg_count) { | 278 if (IdentifierIsStop(name) && !arg_count) { |
279 bindings->instance()->Stop(); | 279 bindings->instance()->Stop(); |
280 return true; | 280 return true; |
281 } | 281 } |
282 | 282 |
283 if (IdentifierIsTerminate(name)) { | 283 if (IdentifierIsTerminate(name)) { |
284 bindings->instance()->TerminateGuest(); | 284 bindings->instance()->TerminateGuest(); |
| 285 return true; |
285 } | 286 } |
286 | 287 |
287 return false; | 288 return false; |
288 } | 289 } |
289 | 290 |
290 bool BrowserPluginBindingsInvokeDefault(NPObject* np_obj, | 291 bool BrowserPluginBindingsInvokeDefault(NPObject* np_obj, |
291 const NPVariant* args, | 292 const NPVariant* args, |
292 uint32 arg_count, | 293 uint32 arg_count, |
293 NPVariant* result) { | 294 NPVariant* result) { |
294 NOTIMPLEMENTED(); | 295 NOTIMPLEMENTED(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 WebBindings::createObject(NULL, &browser_plugin_message_class); | 401 WebBindings::createObject(NULL, &browser_plugin_message_class); |
401 np_object_ = static_cast<BrowserPluginBindings::BrowserPluginNPObject*>(obj); | 402 np_object_ = static_cast<BrowserPluginBindings::BrowserPluginNPObject*>(obj); |
402 np_object_->message_channel = weak_ptr_factory_.GetWeakPtr(); | 403 np_object_->message_channel = weak_ptr_factory_.GetWeakPtr(); |
403 } | 404 } |
404 | 405 |
405 BrowserPluginBindings::~BrowserPluginBindings() { | 406 BrowserPluginBindings::~BrowserPluginBindings() { |
406 WebBindings::releaseObject(np_object_); | 407 WebBindings::releaseObject(np_object_); |
407 } | 408 } |
408 | 409 |
409 } // namespace content | 410 } // namespace content |
OLD | NEW |