OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // Represents one time a plugin appears on one web page. | 80 // Represents one time a plugin appears on one web page. |
81 // | 81 // |
82 // Note: to get from a PP_Instance to a PluginInstance*, use the | 82 // Note: to get from a PP_Instance to a PluginInstance*, use the |
83 // ResourceTracker. | 83 // ResourceTracker. |
84 class PluginInstance : public base::RefCounted<PluginInstance>, | 84 class PluginInstance : public base::RefCounted<PluginInstance>, |
85 public ::ppapi::FunctionGroupBase, | 85 public ::ppapi::FunctionGroupBase, |
86 public ::ppapi::thunk::PPB_Instance_FunctionAPI, | 86 public ::ppapi::thunk::PPB_Instance_FunctionAPI, |
87 public ::ppapi::InstanceImpl { | 87 public ::ppapi::InstanceImpl { |
88 public: | 88 public: |
89 // TODO(dmichael): Delete this for m14. | |
90 // Create and return a PluginInstance object which supports the | 89 // Create and return a PluginInstance object which supports the |
91 // PPP_Instance_0_5 interface. | 90 // PPP_Instance_0_5 interface. |
92 static PluginInstance* Create0_5(PluginDelegate* delegate, | 91 static PluginInstance* Create0_5(PluginDelegate* delegate, |
93 PluginModule* module, | 92 PluginModule* module, |
94 const void* ppp_instance_if_0_5); | 93 const void* ppp_instance_if_0_5); |
95 // Create and return a PluginInstance object which supports the | |
96 // PPP_Instance_0_5 interface. | |
97 static PluginInstance* Create1_0(PluginDelegate* delegate, | |
98 PluginModule* module, | |
99 const void* ppp_instance_if_1_0); | |
100 | 94 |
101 // Delete should be called by the WebPlugin before this destructor. | 95 // Delete should be called by the WebPlugin before this destructor. |
102 virtual ~PluginInstance(); | 96 virtual ~PluginInstance(); |
103 | 97 |
104 PluginDelegate* delegate() const { return delegate_; } | 98 PluginDelegate* delegate() const { return delegate_; } |
105 PluginModule* module() const { return module_.get(); } | 99 PluginModule* module() const { return module_.get(); } |
106 MessageChannel& message_channel() { return *message_channel_; } | 100 MessageChannel& message_channel() { return *message_channel_; } |
107 | 101 |
108 WebKit::WebPluginContainer* container() const { return container_; } | 102 WebKit::WebPluginContainer* container() const { return container_; } |
109 | 103 |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 uint32_t input_event_mask_; | 501 uint32_t input_event_mask_; |
508 uint32_t filtered_input_event_mask_; | 502 uint32_t filtered_input_event_mask_; |
509 | 503 |
510 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 504 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
511 }; | 505 }; |
512 | 506 |
513 } // namespace ppapi | 507 } // namespace ppapi |
514 } // namespace webkit | 508 } // namespace webkit |
515 | 509 |
516 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 510 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |