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

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

Issue 15841013: Make miscellaneous_bindings and event_bindings Required as needed. Previously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
Index: chrome/renderer/extensions/chrome_v8_context_set.h
diff --git a/chrome/renderer/extensions/chrome_v8_context_set.h b/chrome/renderer/extensions/chrome_v8_context_set.h
index e3b764569604c63fac21d7fd224f8716b9b2aada..395fbd8b81f93fa8998c4498438bee5bdf95c126 100644
--- a/chrome/renderer/extensions/chrome_v8_context_set.h
+++ b/chrome/renderer/extensions/chrome_v8_context_set.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/bind.h"
#include "v8/include/v8.h"
class GURL;
@@ -59,14 +60,14 @@ class ChromeV8ContextSet {
ChromeV8Context* GetByV8Context(
v8::Handle<v8::Context> context) const;
- // Calls chromeHidden.<methodName> in each context for <extension_id>. If
- // render_view is non-NULL, only call the function in contexts belonging to
- // that view. The called javascript function should not return a value other
- // than v8::Undefined(). A DCHECK is setup to break if it is otherwise.
- void DispatchChromeHiddenMethod(const std::string& extension_id,
- const std::string& method_name,
- const base::ListValue& arguments,
- content::RenderView* render_view) const;
+ // Re-entrantly runs |callback| with each ChromeV8Context that belongs to
+ // |extension_id| in |render_view|.
+ //
+ // |extension_id| may be "" to match all extensions.
+ // |render_view| may be NULL to match all render views.
+ void ForEach(const std::string& extension_id,
+ content::RenderView* render_view,
+ const base::Callback<void(ChromeV8Context*)>& callback) const;
// Cleans up contexts belonging to an unloaded extension.
//
« no previous file with comments | « chrome/renderer/extensions/chrome_v8_context.cc ('k') | chrome/renderer/extensions/chrome_v8_context_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698