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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 return true; | 247 return true; |
248 } | 248 } |
249 | 249 |
250 if (IdentifierIsStop(name) && !arg_count) { | 250 if (IdentifierIsStop(name) && !arg_count) { |
251 bindings->instance()->Stop(); | 251 bindings->instance()->Stop(); |
252 return true; | 252 return true; |
253 } | 253 } |
254 | 254 |
255 if (IdentifierIsTerminate(name)) { | 255 if (IdentifierIsTerminate(name)) { |
256 bindings->instance()->TerminateGuest(); | 256 bindings->instance()->TerminateGuest(); |
| 257 return true; |
257 } | 258 } |
258 | 259 |
259 return false; | 260 return false; |
260 } | 261 } |
261 | 262 |
262 bool BrowserPluginBindingsInvokeDefault(NPObject* np_obj, | 263 bool BrowserPluginBindingsInvokeDefault(NPObject* np_obj, |
263 const NPVariant* args, | 264 const NPVariant* args, |
264 uint32 arg_count, | 265 uint32 arg_count, |
265 NPVariant* result) { | 266 NPVariant* result) { |
266 NOTIMPLEMENTED(); | 267 NOTIMPLEMENTED(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 WebBindings::createObject(NULL, &browser_plugin_message_class); | 373 WebBindings::createObject(NULL, &browser_plugin_message_class); |
373 np_object_ = static_cast<BrowserPluginBindings::BrowserPluginNPObject*>(obj); | 374 np_object_ = static_cast<BrowserPluginBindings::BrowserPluginNPObject*>(obj); |
374 np_object_->message_channel = weak_ptr_factory_.GetWeakPtr(); | 375 np_object_->message_channel = weak_ptr_factory_.GetWeakPtr(); |
375 } | 376 } |
376 | 377 |
377 BrowserPluginBindings::~BrowserPluginBindings() { | 378 BrowserPluginBindings::~BrowserPluginBindings() { |
378 WebBindings::releaseObject(np_object_); | 379 WebBindings::releaseObject(np_object_); |
379 } | 380 } |
380 | 381 |
381 } // namespace content | 382 } // namespace content |
OLD | NEW |