diff options
author | Manuel Rego Casasnovas <rego@igalia.com> | 2013-02-25 20:22:30 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2013-03-02 22:10:08 +0800 |
commit | 81cbba2fe0acce1de3d78749415fe6eb2374fd71 (patch) | |
tree | 3dc37eb94f09daf3d67a65e227d931b1ad4120d1 /embed | |
parent | 4b8da0f21ae7ea5a47dbf4a0afce79b1437c3bf2 (diff) | |
download | gsoc2013-epiphany-81cbba2fe0acce1de3d78749415fe6eb2374fd71.tar gsoc2013-epiphany-81cbba2fe0acce1de3d78749415fe6eb2374fd71.tar.gz gsoc2013-epiphany-81cbba2fe0acce1de3d78749415fe6eb2374fd71.tar.bz2 gsoc2013-epiphany-81cbba2fe0acce1de3d78749415fe6eb2374fd71.tar.lz gsoc2013-epiphany-81cbba2fe0acce1de3d78749415fe6eb2374fd71.tar.xz gsoc2013-epiphany-81cbba2fe0acce1de3d78749415fe6eb2374fd71.tar.zst gsoc2013-epiphany-81cbba2fe0acce1de3d78749415fe6eb2374fd71.zip |
Implement get web app title in WebKit2
https://bugzilla.gnome.org/show_bug.cgi?id=694144
Diffstat (limited to 'embed')
-rw-r--r-- | embed/web-extension/ephy-web-extension.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c index d6e9f5391..8d82c1a77 100644 --- a/embed/web-extension/ephy-web-extension.c +++ b/embed/web-extension/ephy-web-extension.c @@ -31,6 +31,10 @@ static const char introspection_xml[] = " <arg type='t' name='page_id' direction='in'/>" " <arg type='b' name='has_modified_forms' direction='out'/>" " </method>" + " <method name='GetWebAppTitle'>" + " <arg type='t' name='page_id' direction='in'/>" + " <arg type='s' name='title' direction='out'/>" + " </method>" " </interface>" "</node>"; @@ -64,6 +68,11 @@ handle_method_call (GDBusConnection *connection, gboolean has_modifed_forms = ephy_web_dom_utils_has_modified_forms (document); g_dbus_method_invocation_return_value (invocation, g_variant_new ("(b)", has_modifed_forms)); + } else if (g_strcmp0 (method_name, "GetWebAppTitle") == 0) { + WebKitDOMDocument *document = webkit_web_page_get_dom_document (web_page); + char *title = ephy_web_dom_utils_get_application_title (document); + + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", title ? title : "")); } } |