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

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

Issue 155707: Changed the extension.connect() API not to broadcast to all tabs. Added a (Closed)
Patch Set: review comments Created 11 years, 5 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/render_messages_internal.h ('k') | chrome/renderer/extensions/event_bindings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/bindings_utils.h
diff --git a/chrome/renderer/extensions/bindings_utils.h b/chrome/renderer/extensions/bindings_utils.h
index 2c81b0cb6fd99ae5565a6261a05c750d6238a782..324a73cc13a0522dc56736aead4c37dfa17a9391 100644
--- a/chrome/renderer/extensions/bindings_utils.h
+++ b/chrome/renderer/extensions/bindings_utils.h
@@ -65,11 +65,16 @@ struct ContextInfo {
// was injected in. This is empty if the context is not a content script.
v8::Persistent<v8::Context> parent_context;
+ // The RenderView that this context belongs to. This is not guaranteed to be
+ // a valid pointer, and is used for comparisons only. Do not dereference.
+ RenderView* render_view;
+
ContextInfo(v8::Persistent<v8::Context> context,
const std::string& extension_id,
- v8::Persistent<v8::Context> parent_context)
+ v8::Persistent<v8::Context> parent_context,
+ RenderView* render_view)
: context(context), extension_id(extension_id),
- parent_context(parent_context) {}
+ parent_context(parent_context), render_view(render_view) {}
};
typedef std::list< linked_ptr<ContextInfo> > ContextList;
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/extensions/event_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698