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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 gfx::PluginWindowHandle window_handle() const { return window_handle_; } | 78 gfx::PluginWindowHandle window_handle() const { return window_handle_; } |
79 void set_window_handle(gfx::PluginWindowHandle value) { | 79 void set_window_handle(gfx::PluginWindowHandle value) { |
80 window_handle_ = value; | 80 window_handle_ = value; |
81 } | 81 } |
82 | 82 |
83 // Get/Set whether this instance is in Windowless mode. | 83 // Get/Set whether this instance is in Windowless mode. |
84 // Default is false. | 84 // Default is false. |
85 bool windowless() { return windowless_; } | 85 bool windowless() { return windowless_; } |
86 void set_windowless(bool value) { windowless_ = value; } | 86 void set_windowless(bool value) { windowless_ = value; } |
87 | 87 |
88 // Get/Set whether this instance is transparent. | 88 // Get/Set whether this instance is transparent. This only applies to |
89 // This only applies to windowless plugins. Transparent | 89 // windowless plugins. Transparent plugins require that webkit paint the |
90 // plugins require that webkit paint the background. | 90 // background. |
91 // Default is true. | 91 // Default is true for all plugins other than Flash. For Flash, we default to |
| 92 // opaque since it always tells us if it's transparent during NPP_New. |
92 bool transparent() { return transparent_; } | 93 bool transparent() { return transparent_; } |
93 void set_transparent(bool value) { transparent_ = value; } | 94 void set_transparent(bool value) { transparent_ = value; } |
94 | 95 |
95 // Get/Set the WebPlugin associated with this instance | 96 // Get/Set the WebPlugin associated with this instance |
96 WebPlugin* webplugin() { return webplugin_; } | 97 WebPlugin* webplugin() { return webplugin_; } |
97 void set_web_plugin(WebPlugin* webplugin) { | 98 void set_web_plugin(WebPlugin* webplugin) { |
98 webplugin_ = webplugin; | 99 webplugin_ = webplugin; |
99 } | 100 } |
100 | 101 |
101 // Get the mimeType for this plugin stream | 102 // Get the mimeType for this plugin stream |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 private: | 363 private: |
363 scoped_refptr<PluginInstance> instance_; | 364 scoped_refptr<PluginInstance> instance_; |
364 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); | 365 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); |
365 }; | 366 }; |
366 #endif | 367 #endif |
367 | 368 |
368 } // namespace npapi | 369 } // namespace npapi |
369 } // namespace webkit | 370 } // namespace webkit |
370 | 371 |
371 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_ | 372 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |