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

Unified Diff: chrome/renderer/extensions/chrome_v8_context.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
« 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..676514da496e58c405bd09633e37df3e45c6c3c9 100644
--- a/chrome/renderer/extensions/chrome_v8_context.h
+++ b/chrome/renderer/extensions/chrome_v8_context.h
@@ -85,19 +85,15 @@ 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.
+ 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 +114,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