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

Unified Diff: webkit/glue/webframe.h

Issue 113085: Split V8Proxy::retrieveActiveFrame() into two methods. (Closed)
Patch Set: Darin feedback Created 11 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 | « webkit/glue/webdevtoolsclient_impl.cc ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webframe.h
diff --git a/webkit/glue/webframe.h b/webkit/glue/webframe.h
index e1495fa6f3d780e6ee054dd8185eef638bbe8cc4..77d3b27988e22bddfaf6ed3e6dc7695cba118b69 100644
--- a/webkit/glue/webframe.h
+++ b/webkit/glue/webframe.h
@@ -32,7 +32,23 @@ class WebFrame {
public:
WebFrame() {}
- static WebFrame* RetrieveActiveFrame();
+ // The two functions below retrieve WebFrame instances relating the currently
+ // executing JavaScript. Since JavaScript can make function calls across
+ // frames, though, we need to be more precise.
+ //
+ // For example, imagine that a JS function in frame A calls a function in
+ // frame B, which calls native code, which wants to know what the 'active'
+ // frame is.
+ //
+ // The 'entered context' is the context where execution first entered the
+ // script engine; the context that is at the bottom of the JS function stack.
+ // RetrieveFrameForEnteredContext() would return Frame A in our example.
+ //
+ // The 'current context' is the context the JS engine is currently inside of;
+ // the context that is at the top of the JS function stack.
+ // RetrieveFrameForCurrentContext() would return Frame B in our example.
+ static WebFrame* RetrieveFrameForEnteredContext();
+ static WebFrame* RetrieveFrameForCurrentContext();
// Binds a C++ class to a JavaScript property of the window object. This
// should generally be used via CppBoundClass::BindToJavascript() instead of
« no previous file with comments | « webkit/glue/webdevtoolsclient_impl.cc ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698