| 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // Wrapper exists only for NPObjects that we had created. | 40 // Wrapper exists only for NPObjects that we had created. |
| 41 if (&npclass_proxy_ == object->_class) { | 41 if (&npclass_proxy_ == object->_class) { |
| 42 NPObjectWrapper* wrapper = reinterpret_cast<NPObjectWrapper*>(object); | 42 NPObjectWrapper* wrapper = reinterpret_cast<NPObjectWrapper*>(object); |
| 43 proxy = wrapper->proxy; | 43 proxy = wrapper->proxy; |
| 44 } | 44 } |
| 45 | 45 |
| 46 return proxy; | 46 return proxy; |
| 47 } | 47 } |
| 48 | 48 |
| 49 NPObject* NPObjectProxy::GetUnderlyingNPObject() { |
| 50 return NULL; |
| 51 } |
| 52 |
| 53 IPC::Channel::Listener* NPObjectProxy::GetChannelListener() { |
| 54 return static_cast<IPC::Channel::Listener*>(this); |
| 55 } |
| 56 |
| 49 NPObjectProxy::NPObjectProxy( | 57 NPObjectProxy::NPObjectProxy( |
| 50 PluginChannelBase* channel, | 58 PluginChannelBase* channel, |
| 51 int route_id, | 59 int route_id, |
| 52 gfx::NativeViewId containing_window, | 60 gfx::NativeViewId containing_window, |
| 53 const GURL& page_url) | 61 const GURL& page_url) |
| 54 : channel_(channel), | 62 : channel_(channel), |
| 55 route_id_(route_id), | 63 route_id_(route_id), |
| 56 containing_window_(containing_window), | 64 containing_window_(containing_window), |
| 57 page_url_(page_url) { | 65 page_url_(page_url) { |
| 58 channel_->AddRoute(route_id, this, this); | 66 channel_->AddRoute(route_id, this, this); |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 proxy->Send(msg); | 490 proxy->Send(msg); |
| 483 // Send may delete proxy. | 491 // Send may delete proxy. |
| 484 proxy = NULL; | 492 proxy = NULL; |
| 485 if (!result) | 493 if (!result) |
| 486 return false; | 494 return false; |
| 487 | 495 |
| 488 CreateNPVariant( | 496 CreateNPVariant( |
| 489 result_param, channel.get(), result_var, containing_window, page_url); | 497 result_param, channel.get(), result_var, containing_window, page_url); |
| 490 return true; | 498 return true; |
| 491 } | 499 } |
| OLD | NEW |