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 // TODO: Need to deal with NPAPI's NPSavedData. | 5 // TODO: Need to deal with NPAPI's NPSavedData. |
6 // I haven't seen plugins use it yet. | 6 // I haven't seen plugins use it yet. |
7 | 7 |
8 #ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_ | 8 #ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_ |
9 #define WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_ | 9 #define WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_ |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 // Get/Set the WebPlugin associated with this instance | 95 // Get/Set the WebPlugin associated with this instance |
96 WebPlugin* webplugin() { return webplugin_; } | 96 WebPlugin* webplugin() { return webplugin_; } |
97 void set_web_plugin(WebPlugin* webplugin) { | 97 void set_web_plugin(WebPlugin* webplugin) { |
98 webplugin_ = webplugin; | 98 webplugin_ = webplugin; |
99 } | 99 } |
100 | 100 |
101 // Get the mimeType for this plugin stream | 101 // Get the mimeType for this plugin stream |
102 const std::string &mime_type() { return mime_type_; } | 102 const std::string &mime_type() { return mime_type_; } |
103 | 103 |
104 PluginLib* plugin_lib() { return plugin_; } | 104 PluginLib* plugin_lib() { return plugin_.get(); } |
105 | 105 |
106 #if defined(OS_MACOSX) | 106 #if defined(OS_MACOSX) |
107 // Get/Set the Mac NPAPI drawing and event models | 107 // Get/Set the Mac NPAPI drawing and event models |
108 NPDrawingModel drawing_model() { return drawing_model_; } | 108 NPDrawingModel drawing_model() { return drawing_model_; } |
109 void set_drawing_model(NPDrawingModel value) { drawing_model_ = value; } | 109 void set_drawing_model(NPDrawingModel value) { drawing_model_ = value; } |
110 NPEventModel event_model() { return event_model_; } | 110 NPEventModel event_model() { return event_model_; } |
111 void set_event_model(NPEventModel value) { event_model_ = value; } | 111 void set_event_model(NPEventModel value) { event_model_ = value; } |
112 // Updates the instance's tracking of the location of the plugin location | 112 // Updates the instance's tracking of the location of the plugin location |
113 // relative to the upper left of the screen. | 113 // relative to the upper left of the screen. |
114 void set_plugin_origin(const gfx::Point& origin) { plugin_origin_ = origin; } | 114 void set_plugin_origin(const gfx::Point& origin) { plugin_origin_ = origin; } |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 private: | 362 private: |
363 scoped_refptr<PluginInstance> instance_; | 363 scoped_refptr<PluginInstance> instance_; |
364 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); | 364 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); |
365 }; | 365 }; |
366 #endif | 366 #endif |
367 | 367 |
368 } // namespace npapi | 368 } // namespace npapi |
369 } // namespace webkit | 369 } // namespace webkit |
370 | 370 |
371 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_ | 371 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |