| 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 // A class that receives IPC messages from an NPObjectProxy and calls the real | 5 // A class that receives IPC messages from an NPObjectProxy and calls the real |
| 6 // NPObject. | 6 // NPObject. |
| 7 | 7 |
| 8 #ifndef CONTENT_COMMON_NPOBJECT_STUB_H_ | 8 #ifndef CONTENT_COMMON_NPOBJECT_STUB_H_ |
| 9 #define CONTENT_COMMON_NPOBJECT_STUB_H_ | 9 #define CONTENT_COMMON_NPOBJECT_STUB_H_ |
| 10 | 10 |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "content/common/npobject_base.h" | 15 #include "content/common/npobject_base.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 #include "ipc/ipc_listener.h" | 17 #include "ipc/ipc_listener.h" |
| 18 #include "ipc/ipc_sender.h" | 18 #include "ipc/ipc_sender.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
| 20 | 20 |
| 21 struct NPObject; |
| 22 |
| 23 namespace content { |
| 21 class NPChannelBase; | 24 class NPChannelBase; |
| 22 struct NPIdentifier_Param; | 25 struct NPIdentifier_Param; |
| 23 struct NPObject; | |
| 24 struct NPVariant_Param; | 26 struct NPVariant_Param; |
| 25 | 27 |
| 26 // This wraps an NPObject and converts IPC messages from NPObjectProxy to calls | 28 // This wraps an NPObject and converts IPC messages from NPObjectProxy to calls |
| 27 // to the object. The results are marshalled back. See npobject_proxy.h for | 29 // to the object. The results are marshalled back. See npobject_proxy.h for |
| 28 // more information. | 30 // more information. |
| 29 class NPObjectStub : public IPC::Listener, | 31 class NPObjectStub : public IPC::Listener, |
| 30 public IPC::Sender, | 32 public IPC::Sender, |
| 31 public base::SupportsWeakPtr<NPObjectStub>, | 33 public base::SupportsWeakPtr<NPObjectStub>, |
| 32 public NPObjectBase { | 34 public NPObjectBase { |
| 33 public: | 35 public: |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 private: | 88 private: |
| 87 NPObject* npobject_; | 89 NPObject* npobject_; |
| 88 scoped_refptr<NPChannelBase> channel_; | 90 scoped_refptr<NPChannelBase> channel_; |
| 89 int route_id_; | 91 int route_id_; |
| 90 gfx::NativeViewId containing_window_; | 92 gfx::NativeViewId containing_window_; |
| 91 | 93 |
| 92 // The url of the main frame hosting the plugin. | 94 // The url of the main frame hosting the plugin. |
| 93 GURL page_url_; | 95 GURL page_url_; |
| 94 }; | 96 }; |
| 95 | 97 |
| 98 } // namespace content |
| 99 |
| 96 #endif // CONTENT_COMMON_NPOBJECT_STUB_H_ | 100 #endif // CONTENT_COMMON_NPOBJECT_STUB_H_ |
| OLD | NEW |