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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.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
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 CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
7 7
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 void DidCommitCompositorFrame(); 167 void DidCommitCompositorFrame();
168 168
169 // Returns whether a message should be forwarded to BrowserPlugin. 169 // Returns whether a message should be forwarded to BrowserPlugin.
170 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); 170 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message);
171 171
172 // WebKit::WebPlugin implementation. 172 // WebKit::WebPlugin implementation.
173 virtual WebKit::WebPluginContainer* container() const OVERRIDE; 173 virtual WebKit::WebPluginContainer* container() const OVERRIDE;
174 virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE; 174 virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE;
175 virtual void destroy() OVERRIDE; 175 virtual void destroy() OVERRIDE;
176 virtual NPObject* scriptableObject() OVERRIDE; 176 virtual NPObject* scriptableObject() OVERRIDE;
177 virtual struct _NPP* pluginNPP() OVERRIDE;
177 virtual bool supportsKeyboardFocus() const OVERRIDE; 178 virtual bool supportsKeyboardFocus() const OVERRIDE;
178 virtual bool canProcessDrag() const OVERRIDE; 179 virtual bool canProcessDrag() const OVERRIDE;
179 virtual void paint( 180 virtual void paint(
180 WebKit::WebCanvas* canvas, 181 WebKit::WebCanvas* canvas,
181 const WebKit::WebRect& rect) OVERRIDE; 182 const WebKit::WebRect& rect) OVERRIDE;
182 virtual void updateGeometry( 183 virtual void updateGeometry(
183 const WebKit::WebRect& frame_rect, 184 const WebKit::WebRect& frame_rect,
184 const WebKit::WebRect& clip_rect, 185 const WebKit::WebRect& clip_rect,
185 const WebKit::WebVector<WebKit::WebRect>& cut_outs_rects, 186 const WebKit::WebVector<WebKit::WebRect>& cut_outs_rects,
186 bool is_visible) OVERRIDE; 187 bool is_visible) OVERRIDE;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 // will change after a navigation (e.g., for back, forward, or go), because 435 // will change after a navigation (e.g., for back, forward, or go), because
435 // the changes are not always obvious. For example, there is a maximum 436 // the changes are not always obvious. For example, there is a maximum
436 // number of entries and earlier ones will automatically be pruned. 437 // number of entries and earlier ones will automatically be pruned.
437 int current_nav_entry_index_; 438 int current_nav_entry_index_;
438 int nav_entry_count_; 439 int nav_entry_count_;
439 440
440 // Used for HW compositing. 441 // Used for HW compositing.
441 bool compositing_enabled_; 442 bool compositing_enabled_;
442 scoped_refptr<BrowserPluginCompositingHelper> compositing_helper_; 443 scoped_refptr<BrowserPluginCompositingHelper> compositing_helper_;
443 444
445 // Used to identify the plugin to WebBindings.
446 scoped_ptr<struct _NPP> npp_;
447
444 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might 448 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might
445 // get called after BrowserPlugin has been destroyed. 449 // get called after BrowserPlugin has been destroyed.
446 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; 450 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_;
447 451
448 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); 452 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin);
449 }; 453 };
450 454
451 } // namespace content 455 } // namespace content
452 456
453 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 457 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
OLDNEW
« no previous file with comments | « chrome/renderer/plugins/webview_plugin.cc ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698