Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: webkit/glue/plugins/plugin_instance.h

Issue 5040: Fix painting problem with transparent plugins because plugins were ignoring t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/plugin_host.cc ('k') | webkit/glue/plugins/plugin_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 virtual void DidFinishLoadWithReason(NPReason reason); 135 virtual void DidFinishLoadWithReason(NPReason reason);
136 136
137 // Helper method to set some persistent data for getURLNotify since 137 // Helper method to set some persistent data for getURLNotify since
138 // resource fetches happen async. 138 // resource fetches happen async.
139 void SetURLLoadData(const GURL& url, void* notify_data); 139 void SetURLLoadData(const GURL& url, void* notify_data);
140 140
141 // If true, send the Mozilla user agent instead of Chrome's to the plugin. 141 // If true, send the Mozilla user agent instead of Chrome's to the plugin.
142 bool use_mozilla_user_agent() { return use_mozilla_user_agent_; } 142 bool use_mozilla_user_agent() { return use_mozilla_user_agent_; }
143 void set_use_mozilla_user_agent() { use_mozilla_user_agent_ = true; } 143 void set_use_mozilla_user_agent() { use_mozilla_user_agent_ = true; }
144 144
145 bool throttle_invalidate() const { return throttle_invalidate_; }
146 void set_throttle_invalidate(bool throttle_invalidate) {
147 throttle_invalidate_ = throttle_invalidate;
148 }
149
150 // Helper that implements NPN_PluginThreadAsyncCall semantics 145 // Helper that implements NPN_PluginThreadAsyncCall semantics
151 void PluginThreadAsyncCall(void (*func)(void *), 146 void PluginThreadAsyncCall(void (*func)(void *),
152 void *userData); 147 void *userData);
153 148
154 // 149 //
155 // NPAPI methods for calling the Plugin Instance 150 // NPAPI methods for calling the Plugin Instance
156 // 151 //
157 NPError NPP_New(unsigned short, short, char *[], char *[]); 152 NPError NPP_New(unsigned short, short, char *[], char *[]);
158 NPError NPP_SetWindow(NPWindow *); 153 NPError NPP_SetWindow(NPWindow *);
159 NPError NPP_NewStream(NPMIMEType, NPStream *, NPBool, unsigned short *); 154 NPError NPP_NewStream(NPMIMEType, NPStream *, NPBool, unsigned short *);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // (MozillaExtensionApi) created as a result of NPN_GetValue 236 // (MozillaExtensionApi) created as a result of NPN_GetValue
242 // in the context of NP_Initialize. 237 // in the context of NP_Initialize.
243 static ThreadLocalStorage::Slot plugin_instance_tls_index_; 238 static ThreadLocalStorage::Slot plugin_instance_tls_index_;
244 scoped_refptr<PluginStreamUrl> plugin_data_stream_; 239 scoped_refptr<PluginStreamUrl> plugin_data_stream_;
245 GURL instance_url_; 240 GURL instance_url_;
246 241
247 // This flag if true indicates that the plugin data would be passed from 242 // This flag if true indicates that the plugin data would be passed from
248 // webkit. if false indicates that the plugin should download the data. 243 // webkit. if false indicates that the plugin should download the data.
249 bool load_manually_; 244 bool load_manually_;
250 245
251 // This flag indicates if the NPN_InvalidateRect calls made by the
252 // plugin need to be throttled.
253 bool throttle_invalidate_;
254
255 // Stack indicating if popups are to be enabled for the outgoing 246 // Stack indicating if popups are to be enabled for the outgoing
256 // NPN_GetURL/NPN_GetURLNotify calls. 247 // NPN_GetURL/NPN_GetURLNotify calls.
257 std::stack<bool> popups_enabled_stack_; 248 std::stack<bool> popups_enabled_stack_;
258 249
259 // True if in CloseStreams(). 250 // True if in CloseStreams().
260 bool in_close_streams_; 251 bool in_close_streams_;
261 252
262 DISALLOW_EVIL_CONSTRUCTORS(PluginInstance); 253 DISALLOW_EVIL_CONSTRUCTORS(PluginInstance);
263 }; 254 };
264 255
265 } // namespace NPAPI 256 } // namespace NPAPI
266 257
267 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ 258 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_host.cc ('k') | webkit/glue/plugins/plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698