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

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

Issue 8761020: Only create chromeHidden object when needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move GetChromeHidden to ChromeV8Context Created 9 years, 1 month 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 | « no previous file | 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 dfa922db9fe9317f3304fee7f618cd15cc2dbb8c..bbacfd194b6d5d5e81a32302cd443522e64f1881 100644
--- a/chrome/renderer/extensions/chrome_v8_context.h
+++ b/chrome/renderer/extensions/chrome_v8_context.h
@@ -46,6 +46,18 @@ class ChromeV8Context {
web_frame_ = NULL;
}
+ // Returns a special Chrome-specific hidden object that is associated with a
+ // context, but not reachable from the JavaScript in that context. This is
+ // used by our v8::Extension implementations as a way to share code and as a
+ // bridge between C++ and JavaScript.
+ static v8::Handle<v8::Value> GetOrCreateChromeHidden(
+ v8::Handle<v8::Context> context);
+
+ // Return the chromeHidden object associated with this context, or an empty
+ // handle if no chrome hidden has been created (by GetOrCreateChromeHidden)
+ // yet for this context.
+ v8::Handle<v8::Value> GetChromeHidden() const;
+
// Returns the RenderView associated with this context. Can return NULL if the
// context is in the process of being destroyed.
content::RenderView* GetRenderView() const;
« no previous file with comments | « no previous file | chrome/renderer/extensions/chrome_v8_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698