~ubuntuone-control-tower/libubuntuone/stable-3-0

« back to all changes in this revision

Viewing changes to libubuntuone/u1-music-store.c

  • Committer: Tarmac
  • Author(s): Rodney Dawes
  • Date: 2011-03-14 15:31:38 UTC
  • mfrom: (122.3.2 custom-uris)
  • Revision ID: tarmac-20110314153138-xzncbq10kqy1w0pk
Add the starting code for a custom request handler for u1chrome: URIs
Reuqire new libsoup for the custom request handler

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "oauth.h"
31
31
#include "u1-music-store.h"
32
32
#include "u1-marshal.h"
 
33
#include "u1-request-chrome.h"
33
34
 
34
35
#define U1_MUSIC_LIBRARY_LOCATION  ".ubuntuone/Purchased from Ubuntu One"
35
36
 
944
945
{
945
946
        gchar *new_user_agent;
946
947
        const gchar *url_to_use;
 
948
        SoupSession *session;
947
949
 
948
950
        if (!g_thread_get_initialized ())
949
951
                g_thread_init (NULL);
977
979
                      NULL);
978
980
        g_free(new_user_agent);
979
981
 
 
982
        session = webkit_get_default_session ();
 
983
 
980
984
        /* Use GNOME proxy settings */
981
 
        soup_session_add_feature_by_type (webkit_get_default_session (), SOUP_TYPE_PROXY_RESOLVER_GNOME);
 
985
        soup_session_add_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER_GNOME);
 
986
 
 
987
        /* Add our handler for u1chrome: URIs */
 
988
        soup_session_add_feature_by_type (session, U1_TYPE_REQUEST_CHROME);
982
989
 
983
990
        g_signal_connect (G_OBJECT (music_store->priv->web_viewer), "navigation-policy-decision-requested",
984
991
                                  G_CALLBACK (navigation_requested_cb), music_store);