| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 8 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
| 9 #define WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 9 #define WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
| 10 | 10 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 NPObject *GetPluginScriptableObject(); | 154 NPObject *GetPluginScriptableObject(); |
| 155 | 155 |
| 156 // WebViewDelegate methods that we implement. This is for handling | 156 // WebViewDelegate methods that we implement. This is for handling |
| 157 // callbacks during getURLNotify. | 157 // callbacks during getURLNotify. |
| 158 void DidFinishLoadWithReason(const GURL& url, NPReason reason, int notify_id); | 158 void DidFinishLoadWithReason(const GURL& url, NPReason reason, int notify_id); |
| 159 | 159 |
| 160 // If true, send the Mozilla user agent instead of Chrome's to the plugin. | 160 // If true, send the Mozilla user agent instead of Chrome's to the plugin. |
| 161 bool use_mozilla_user_agent() { return use_mozilla_user_agent_; } | 161 bool use_mozilla_user_agent() { return use_mozilla_user_agent_; } |
| 162 void set_use_mozilla_user_agent() { use_mozilla_user_agent_ = true; } | 162 void set_use_mozilla_user_agent() { use_mozilla_user_agent_ = true; } |
| 163 | 163 |
| 164 // If the plugin instance is backed by a texture, return its ID in the |
| 165 // compositor's namespace. Otherwise return 0. Returns 0 by default. |
| 166 virtual unsigned GetBackingTextureId(); |
| 167 |
| 164 // Helper that implements NPN_PluginThreadAsyncCall semantics | 168 // Helper that implements NPN_PluginThreadAsyncCall semantics |
| 165 void PluginThreadAsyncCall(void (*func)(void *), | 169 void PluginThreadAsyncCall(void (*func)(void *), |
| 166 void *userData); | 170 void *userData); |
| 167 | 171 |
| 168 uint32 ScheduleTimer(uint32 interval, | 172 uint32 ScheduleTimer(uint32 interval, |
| 169 NPBool repeat, | 173 NPBool repeat, |
| 170 void (*func)(NPP id, uint32 timer_id)); | 174 void (*func)(NPP id, uint32 timer_id)); |
| 171 | 175 |
| 172 void UnscheduleTimer(uint32 timer_id); | 176 void UnscheduleTimer(uint32 timer_id); |
| 173 | 177 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 } | 354 } |
| 351 private: | 355 private: |
| 352 scoped_refptr<PluginInstance> instance_; | 356 scoped_refptr<PluginInstance> instance_; |
| 353 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); | 357 DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent); |
| 354 }; | 358 }; |
| 355 #endif | 359 #endif |
| 356 | 360 |
| 357 } // namespace NPAPI | 361 } // namespace NPAPI |
| 358 | 362 |
| 359 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 363 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
| OLD | NEW |