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

Unified Diff: chrome/renderer/extensions/bindings_utils.h

Issue 8073023: Merge 101221 - Reland 101111 - Only deliver extension messages to contexts that care. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/874/src/
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/renderer/extensions/bindings_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/bindings_utils.h
===================================================================
--- chrome/renderer/extensions/bindings_utils.h (revision 103262)
+++ chrome/renderer/extensions/bindings_utils.h (working copy)
@@ -30,14 +30,22 @@
WebKit::WebFrame* frame);
~ContextInfo();
+ // Returns the web frame associated with this context. Can also return NULL if
+ // the context has been disassociated with the frame, and not GC'd yet.
+ WebKit::WebFrame* GetWebFrame() const;
+
+ // Returns the RenderView associated wit hthis context. Can also return NULL.
+ RenderView* GetRenderView() const;
+
v8::Persistent<v8::Context> context;
// The extension ID this context is associated with.
std::string extension_id;
// The frame the context is associated with. ContextInfo can outlive its
- // frame, so this should not be dereferenced. It is stored only for use for
- // comparison.
+ // frame, so this should not be dereferenced. Use GetWebFrame() instead for
+ // most cases. This is used for comparisons during unload when GetWebFrame()
+ // doesn't work.
void* unsafe_frame;
// A count of the number of events that are listening in this context. When
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/renderer/extensions/bindings_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698