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

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

Issue 15855010: Make ExtensionMsg_MessageInvoke run a module system function rather than a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test compile 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/extensions/app_bindings.cc ('k') | chrome/renderer/extensions/chrome_v8_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/chrome_v8_context.h
diff --git a/chrome/renderer/extensions/chrome_v8_context.h b/chrome/renderer/extensions/chrome_v8_context.h
index 3c967b2dcf3300f17b5fc6ce1eb8e429d31cdb26..ac4b845aa073ea7d0fde4d33def59683d0e14aa2 100644
--- a/chrome/renderer/extensions/chrome_v8_context.h
+++ b/chrome/renderer/extensions/chrome_v8_context.h
@@ -85,19 +85,17 @@ class ChromeV8Context : public RequestSender::Source {
// context is in the process of being destroyed.
content::RenderView* GetRenderView() const;
+ // Runs |function| with appropriate scopes. Doesn't catch exceptions, callers
+ // must do that if they want.
+ //
+ // USE THIS METHOD RATHER THAN v8::Function::Call WHEREVER POSSIBLE.
+ v8::Local<v8::Value> CallFunction(v8::Handle<v8::Function> function,
+ int argc,
+ v8::Handle<v8::Value> argv[]) const;
+
// Fires the onunload event on the chromeHidden object.
void DispatchOnUnloadEvent();
- // Call the named method of the chromeHidden object in this context.
- // The function can be a sub-property like "Port.dispatchOnMessage". Returns
- // the result of the function call in |result| if |result| is non-NULL. If the
- // named method does not exist, returns false.
- bool CallChromeHiddenMethod(
- const std::string& function_name,
- int argc,
- v8::Handle<v8::Value>* argv,
- v8::Handle<v8::Value>* result) const;
-
// Returns the availability of the API |api_name|.
Feature::Availability GetAvailability(const std::string& api_name);
@@ -118,6 +116,8 @@ class ChromeV8Context : public RequestSender::Source {
const std::string& error) OVERRIDE;
private:
+ bool is_valid() const;
+
// The v8 context the bindings are accessible to.
ScopedPersistent<v8::Context> v8_context_;
« no previous file with comments | « chrome/renderer/extensions/app_bindings.cc ('k') | chrome/renderer/extensions/chrome_v8_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698