Index: embed/webkit/webkit-embed.cpp
===================================================================
--- embed/webkit/webkit-embed.cpp	(revisione 7551)
+++ embed/webkit/webkit-embed.cpp	(copia locale)
@@ -26,6 +26,7 @@
 #include "ephy-embed-single.h"
 #include "ephy-string.h"
 #include "ephy-embed-event.h"
+#include "ephy-embed-utils.h"
 
 #include <webkitgtkframe.h>
 #include <webkitgtkpage.h>
@@ -62,6 +63,7 @@ struct WebKitEmbedPrivate
   EphyEmbedDocumentType document_type;
   EphyEmbedNavigationFlags nav_flags;
   float zoom;
+  char *link_message;
   
   /* Flags */
   guint is_loading : 1;
@@ -76,6 +78,7 @@ enum 
   PROP_DOCUMENT_TYPE,
   PROP_LOAD_PROGRESS,
   PROP_LOAD_STATUS,
+  PROP_LINK_MESSAGE,
   PROP_NAVIGATION,
   PROP_SECURITY,
   PROP_ZOOM
@@ -160,6 +163,30 @@ update_load_state (WebKitEmbed *embed, W
 }
 
 static void
+webkit_embed_set_link_message (WebKitEmbed *wembed,
+                               char *message)
+{
+  WebKitEmbedPrivate *wpriv = wembed->priv;
+  char *link_message;
+
+  g_free (wpriv->link_message);
+
+  link_message = ephy_embed_utils_link_message_parse (message);
+  wpriv->link_message = g_strdup (link_message);
+	
+  g_object_notify (G_OBJECT (wembed), "link-message");
+}
+
+static void
+webkit_embed_hovering_over_link_cb (WebKitPage *page,
+                                    char *title,
+                                    char *url,
+                                    EphyEmbed *embed)
+{
+  webkit_embed_set_link_message (WEBKIT_EMBED (embed), url);
+}
+
+static void
 webkit_embed_load_started_cb (WebKitPage *page,
 			      WebKitFrame *frame,
 			      EphyEmbed *embed)
@@ -235,6 +262,9 @@ webkit_embed_get_property (GObject *obje
     case PROP_LOAD_STATUS:
       g_value_set_boolean (value, priv->is_loading);
       break;
+    case PROP_LINK_MESSAGE:
+      g_value_set_string (value, priv->link_message);
+      break;
     case PROP_NAVIGATION:
       g_value_set_flags (value, priv->nav_flags);
       break;
@@ -255,6 +285,7 @@ webkit_embed_set_property (GObject *obje
     case PROP_DOCUMENT_TYPE:
     case PROP_LOAD_PROGRESS:
     case PROP_LOAD_STATUS:
+    case PROP_LINK_MESSAGE:
     case PROP_NAVIGATION:
     case PROP_SECURITY:
     case PROP_ZOOM:
@@ -288,6 +319,7 @@ webkit_embed_class_init (WebKitEmbedClas
   g_object_class_override_property (object_class, PROP_SECURITY, "security-level");
   g_object_class_override_property (object_class, PROP_ZOOM, "zoom");
   g_object_class_override_property (object_class, PROP_NAVIGATION, "navigation");
+  g_object_class_override_property (object_class, PROP_LINK_MESSAGE, "link-message");
 
   g_type_class_add_private (object_class, sizeof(WebKitEmbedPrivate));
 }
@@ -319,6 +351,8 @@ webkit_embed_init (WebKitEmbed *embed)
                     G_CALLBACK (webkit_embed_title_changed_cb), embed);
   g_signal_connect (G_OBJECT (page), "load-progress-changed",
                     G_CALLBACK (webkit_embed_load_progress_changed_cb), embed);
+  g_signal_connect (G_OBJECT (page), "hovering-over-link",
+                    G_CALLBACK (webkit_embed_hovering_over_link_cb), embed);
   
   embed->priv->document_type = EPHY_EMBED_DOCUMENT_HTML;
   embed->priv->security_level = EPHY_EMBED_STATE_IS_UNKNOWN;
@@ -326,6 +360,7 @@ webkit_embed_init (WebKitEmbed *embed)
   embed->priv->is_setting_zoom = FALSE;
   embed->priv->load_percent = 0;
   embed->priv->is_loading = FALSE;
+  embed->priv->link_message = NULL;
 }
 
 static void
@@ -340,6 +375,7 @@ webkit_embed_finalize (GObject *object)
   WebKitEmbed *wembed = WEBKIT_EMBED (object);
 
   g_free (wembed->priv->loading_uri);
+  g_free (wembed->priv->link_message);
 
   G_OBJECT_CLASS (webkit_embed_parent_class)->finalize (object);
 }
@@ -440,7 +476,15 @@ impl_get_title (EphyEmbed *embed)
 static char *
 impl_get_link_message (EphyEmbed *embed)
 {
-  return NULL;
+  WebKitEmbedPrivate *wpriv = WEBKIT_EMBED (embed)->priv;
+  
+  return wpriv->link_message;
+}
+
+static void
+impl_set_link_message (EphyEmbed *embed, char *message)
+{
+  webkit_embed_set_link_message (WEBKIT_EMBED (embed), message);
 }
 
 static char *
@@ -693,6 +737,7 @@ ephy_embed_iface_init (EphyEmbedIface *i
   iface->get_title = impl_get_title;
   iface->get_location = impl_get_location;
   iface->get_link_message = impl_get_link_message;
+  iface->set_link_message = impl_set_link_message;
   iface->get_js_status = impl_get_js_status;
   iface->reload = impl_reload;
   iface->set_zoom = impl_set_zoom;
