summaryrefslogtreecommitdiff
path: root/desktop/browser.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/browser.c')
-rw-r--r--desktop/browser.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index b9f55ba45..77258df4d 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1927,6 +1927,23 @@ nserror browser_window_navigate(struct browser_window *bw,
}
+/* Exported interface, documented in browser.h */
+nsurl * browser_window_get_url(struct browser_window *bw)
+{
+ assert(bw != NULL);
+
+ if (bw->current_content != NULL) {
+ return hlcache_handle_get_url(bw->current_content);
+
+ } else if (bw->loading_content != NULL) {
+ /* TODO: should we return this? */
+ return hlcache_handle_get_url(bw->loading_content);
+ }
+
+ return corestring_nsurl_about_blank;
+}
+
+
/*
* Get the dimensions of the area a browser window occupies
*