diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-06-21 18:25:41 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-06-21 18:25:41 (GMT) |
commit | 67d5a1dc989473f99b43e968ddec270803d978dc (patch) | |
tree | 31ea3baca50862e5156b7609c94548c4a44662a9 /src/hulahop-web-view.cpp | |
parent | f91a1b5b943b93074c86ac468131607ec01b1f20 (diff) |
Finally put modal dialogs to work.
Diffstat (limited to 'src/hulahop-web-view.cpp')
-rw-r--r-- | src/hulahop-web-view.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/hulahop-web-view.cpp b/src/hulahop-web-view.cpp index 2eeebc6..286f3cf 100644 --- a/src/hulahop-web-view.cpp +++ b/src/hulahop-web-view.cpp @@ -28,6 +28,8 @@ #include <nsIDOMEventTarget.h> #include <nsIBaseWindow.h> #include <nsIInterfaceRequestorUtils.h> +#include <jscntxt.h> +#include <nsIJSContextStack.h> #include <PyXPCOM.h> #include <gtk/gtkfixed.h> @@ -294,3 +296,20 @@ hulahop_web_view_grab_focus(HulahopWebView *web_view) gtk_widget_grab_focus(web_view->mozilla_widget); } } + +void +hulahop_web_view_push_js_context (HulahopWebView *web_view) +{ + nsCOMPtr<nsIJSContextStack> stack(do_GetService("@mozilla.org/js/xpc/ContextStack;1")); + nsresult rv = stack->Push(nsnull); + g_assert(NS_SUCCEEDED(rv)); +} + +void +hulahop_web_view_pop_js_context (HulahopWebView *web_view) +{ + nsCOMPtr<nsIJSContextStack> stack(do_GetService("@mozilla.org/js/xpc/ContextStack;1")); + nsresult rv = stack->Pop(nsnull); + g_assert(NS_SUCCEEDED(rv)); +} + |