Bug 55929

Summary: [GTK] Add proxy support to GtkLauncher
Product: WebKit Reporter: thouraya.andolsi
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: gustavo.noronha, gustavo, mrobinson, ryuan.choi, thouraya.andolsi, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Add proxy support to GtkLauncher
none
Add proxy support to GtkLauncher
gustavo: review-
Add options to request width & height in GtkLauncher none

Description thouraya.andolsi 2011-03-08 01:20:26 PST
Hello,

We are using GtkLauncher and we want to  access to internet via proxy.

I'll attach a patch that will help to do it.

Regards,
Thouraya.
Comment 1 thouraya.andolsi 2011-03-08 02:24:44 PST
Created attachment 85037 [details]
Add proxy support to GtkLauncher
Comment 2 Collabora GTK+ EWS bot 2011-03-08 02:33:29 PST
Attachment 85037 [details] did not build on gtk:
Build output: http://queues.webkit.org/results/8106768
Comment 3 thouraya.andolsi 2011-03-08 05:54:42 PST
Created attachment 85045 [details]
Add proxy support to GtkLauncher

Hello,

I'm working on Linux and I built GtkLauncher successfully without any undefined reference symbol.

In the attached patch I added LIBSOUP_LIBS flag to Programs_GtkLauncher_LDADD to fix the undefined symbol you had.

Regards.
Comment 4 Martin Robinson 2011-03-08 08:23:33 PST
Comment on attachment 85045 [details]
Add proxy support to GtkLauncher

Wouldn't it make more sense to simply add the  SOUP_TYPE_PROXY_RESOLVER_GNOME feature to the session?
Comment 5 Martin Robinson 2011-03-08 08:25:22 PST
Renaming this bug, since I think it's unrelated to the web inspector.
Comment 6 thouraya 2011-03-09 09:46:57 PST
(In reply to comment #4)
> (From update of attachment 85045 [details])
> Wouldn't it make more sense to simply add the  SOUP_TYPE_PROXY_RESOLVER_GNOME feature to the session?

Hello,

We cannot do it because we are not using libsoup-gnome and cross-compiling it because it may depend on another gnome libraries.

Regards,
Thouraya.
Comment 7 Gustavo Noronha (kov) 2011-03-22 08:50:16 PDT
We can now use the new SoupProxyResolverDefault: https://bugzilla.gnome.org/show_bug.cgi?id=642928
Comment 8 Gustavo Noronha (kov) 2011-03-22 08:59:24 PDT
Comment on attachment 85045 [details]
Add proxy support to GtkLauncher

View in context: https://bugs.webkit.org/attachment.cgi?id=85045&action=review

This patch does too many things in one go, going way beyong 'adding proxy support' - it would at least need to be broken up in two or three patches that each do its thing. I also don't like the idea of reinventing argument parsing inside GtkLauncher.  So, to be clear:

1. If we want proxy support, I am OK with using the new default proxy resolver included in libsoup: https://bugzilla.gnome.org/show_bug.cgi?id=642928
2. I'm fine with options to request different width/height, but that should be a separate patch and use glib's option parsing infrastructure, no manual arguments parsing
3. The changes to how webkit_web_view_load_uri is apparently gain us nothing while removing the ability to give GtkLauncher a filename

> Tools/GtkLauncher/main.c:359
> -    gchar *uri =(gchar*)(argc > 1 ? argv[1] : "http://www.google.com/");
> -    gchar *fileURL = filenameToURL(uri);
> -
> -    webkit_web_view_load_uri(webView, fileURL ? fileURL : uri);
> -    g_free(fileURL);
> +    webkit_web_view_load_uri(webView, uri);

This seems to be totally unrelated?
Comment 9 thouraya 2011-03-28 10:49:56 PDT
Created attachment 87165 [details]
Add options to request width & height in GtkLauncher

Hello,

Attached a patch adding options to request width & height in GtkLauncher.

Regards,
Thouraya.
Comment 10 Martin Robinson 2011-03-29 07:21:06 PDT
Comment on attachment 87165 [details]
Add options to request width & height in GtkLauncher

View in context: https://bugs.webkit.org/attachment.cgi?id=87165&action=review

What's the use case for wanting to pass in width and height parameters to GTK+ launcher?

> Tools/ChangeLog:6
> +        Add options to request width/height in GtkLauncher.
> +        https://bugs.webkit.org/show_bug.cgi?id=55929

This is not actually the description in the bug. Probably either this change should be moved to another bug or you should rename this one.
Comment 11 thouraya 2011-03-29 09:02:25 PDT
Hello,


(In reply to comment #10)
> (From update of attachment 87165 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=87165&action=review
> 
> What's the use case for wanting to pass in width and height parameters to GTK+ launcher?

Because in Set top boxes there is no mouse to resize the window, and it's better to give customers the ability to do it.

> 
> > Tools/ChangeLog:6
> > +        Add options to request width/height in GtkLauncher.
> > +        https://bugs.webkit.org/show_bug.cgi?id=55929
> 
> This is not actually the description in the bug. Probably either this change should be moved to another bug or you should rename this one.
Comment 12 thouraya 2011-03-29 09:29:29 PDT
Hello,


(In reply to comment #7)
> We can now use the new SoupProxyResolverDefault: https://bugzilla.gnome.org/show_bug.cgi?id=642928

To add proxy support, I have only to add 3 lines:

SoupSession * ss = webkit_get_default_session();
proxyUri = soup_uri_new(proxy);
g_object_set(ss, SOUP_SESSION_PROXY_URI, proxyUri, NULL);


Why shoold I replace them using SoupProxyResolverDefault?
the problem is in the call to g_object_set()?


Using that API, how to set the proxy property to the session?
I won't use soup_session_async_new_with_options ( the session is already created) and I cannot add it as a new feature to the session.

Thank you very much.
Thouraya.
Comment 13 Martin Robinson 2011-03-29 11:26:33 PDT
(In reply to comment #11)
> > What's the use case for wanting to pass in width and height parameters to GTK+ launcher?
> Because in Set top boxes there is no mouse to resize the window, and it's better to give customers the ability to do it.

GtkLauncher is not meant to be shipped as a browser. It's really just an example of a very basic WebKit embed for developers. It's missing a lot of functionality that a useful browser requires. If you need to ship software for your customers, please create a separate, standalone browser.
Comment 14 thouraya 2011-03-30 02:36:10 PDT
Hello,

(In reply to comment #13)
> (In reply to comment #11)
> > > What's the use case for wanting to pass in width and height parameters to GTK+ launcher?
> > Because in Set top boxes there is no mouse to resize the window, and it's better to give customers the ability to do it.
> 
> GtkLauncher is not meant to be shipped as a browser. It's really just an example of a very basic WebKit embed for developers. It's missing a lot of functionality that a useful browser requires. If you need to ship software for your customers, please create a separate, standalone browser.


Thank you for the response.

Regards.
Comment 15 Ryuan Choi 2011-04-17 19:11:38 PDT
(In reply to comment #13)
> (In reply to comment #11)
> > > What's the use case for wanting to pass in width and height parameters to GTK+ launcher?
> > Because in Set top boxes there is no mouse to resize the window, and it's better to give customers the ability to do it.
> 
> GtkLauncher is not meant to be shipped as a browser. It's really just an example of a very basic WebKit embed for developers. It's missing a lot of functionality that a useful browser requires. If you need to ship software for your customers, please create a separate, standalone browser.

Hello,
I am waiting this bug to get proxy support to Gtklauncher.

As you mentioned,
Gtklauncher is a good example for developer to test.
And I want to contribute something for WebKit/Gtk if I can.
But, I need to add proxy information to test Gtklauncher every time, because I am behind of proxy.

I just want simple patch to add proxy via env.
EWeblauncher already have it.
If you are agree, I can propose a patch.
Comment 16 Martin Robinson 2011-04-18 08:27:31 PDT
(In reply to comment #15)
> As you mentioned, Gtklauncher is a good example for developer to test.  And I want to contribute something for WebKit/Gtk if I can.  But, I need to add proxy information to test Gtklauncher every time, because I am behind of proxy.

Would adding the default soup proxy resolver to the session, as discussed earlier, fulfill your needs? If so, I'd be willing to r+ the patch.
Comment 17 Eric Seidel (no email) 2011-04-18 09:13:48 PDT
Comment on attachment 87165 [details]
Add options to request width & height in GtkLauncher

Cleared review? from attachment 87165 [details] so that this bug does not appear in http://webkit.org/pending-review.  If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).