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. |
// |