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

Side by Side Diff: webkit/plugins/npapi/webplugin_impl.h

Issue 15941006: Track NPObject ownership by the originating plugins' NPP identifier. [2/3] (Chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CppBoundClass. Created 7 years, 6 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/plugins/npapi/webplugin_delegate_impl.cc ('k') | webkit/plugins/npapi/webplugin_impl.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) 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 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IMPL_H_
6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IMPL_H_ 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 uint32 length); 68 uint32 length);
69 69
70 virtual WebPluginDelegate* delegate(); 70 virtual WebPluginDelegate* delegate();
71 71
72 private: 72 private:
73 // WebKit::WebPlugin methods: 73 // WebKit::WebPlugin methods:
74 virtual bool initialize( 74 virtual bool initialize(
75 WebKit::WebPluginContainer* container); 75 WebKit::WebPluginContainer* container);
76 virtual void destroy(); 76 virtual void destroy();
77 virtual NPObject* scriptableObject(); 77 virtual NPObject* scriptableObject();
78 virtual struct _NPP* pluginNPP();
78 virtual bool getFormValue(WebKit::WebString& value); 79 virtual bool getFormValue(WebKit::WebString& value);
79 virtual void paint( 80 virtual void paint(
80 WebKit::WebCanvas* canvas, const WebKit::WebRect& paint_rect); 81 WebKit::WebCanvas* canvas, const WebKit::WebRect& paint_rect);
81 virtual void updateGeometry( 82 virtual void updateGeometry(
82 const WebKit::WebRect& frame_rect, const WebKit::WebRect& clip_rect, 83 const WebKit::WebRect& frame_rect, const WebKit::WebRect& clip_rect,
83 const WebKit::WebVector<WebKit::WebRect>& cut_outs, bool is_visible); 84 const WebKit::WebVector<WebKit::WebRect>& cut_outs, bool is_visible);
84 virtual void updateFocus(bool focused); 85 virtual void updateFocus(bool focused);
85 virtual void updateVisibility(bool visible); 86 virtual void updateVisibility(bool visible);
86 virtual bool acceptsInputEvents(); 87 virtual bool acceptsInputEvents();
87 virtual bool handleInputEvent( 88 virtual bool handleInputEvent(
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 #endif 286 #endif
286 bool accepts_input_events_; 287 bool accepts_input_events_;
287 base::WeakPtr<WebPluginPageDelegate> page_delegate_; 288 base::WeakPtr<WebPluginPageDelegate> page_delegate_;
288 WebKit::WebFrame* webframe_; 289 WebKit::WebFrame* webframe_;
289 290
290 WebPluginDelegate* delegate_; 291 WebPluginDelegate* delegate_;
291 292
292 // This is just a weak reference. 293 // This is just a weak reference.
293 WebKit::WebPluginContainer* container_; 294 WebKit::WebPluginContainer* container_;
294 295
296 // Unique identifier for this plugin, used to track script objects.
297 struct _NPP* npp_;
298
295 typedef std::map<WebPluginResourceClient*, 299 typedef std::map<WebPluginResourceClient*,
296 webkit_glue::MultipartResponseDelegate*> 300 webkit_glue::MultipartResponseDelegate*>
297 MultiPartResponseHandlerMap; 301 MultiPartResponseHandlerMap;
298 // Tracks HTTP multipart response handlers instantiated for 302 // Tracks HTTP multipart response handlers instantiated for
299 // a WebPluginResourceClient instance. 303 // a WebPluginResourceClient instance.
300 MultiPartResponseHandlerMap multi_part_response_map_; 304 MultiPartResponseHandlerMap multi_part_response_map_;
301 305
302 // The plugin source URL. 306 // The plugin source URL.
303 GURL plugin_url_; 307 GURL plugin_url_;
304 308
(...skipping 22 matching lines...) Expand all
327 331
328 base::WeakPtrFactory<WebPluginImpl> weak_factory_; 332 base::WeakPtrFactory<WebPluginImpl> weak_factory_;
329 333
330 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); 334 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl);
331 }; 335 };
332 336
333 } // namespace npapi 337 } // namespace npapi
334 } // namespace webkit 338 } // namespace webkit
335 339
336 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IMPL_H_ 340 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl.cc ('k') | webkit/plugins/npapi/webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698