Re: [Crosswalk-help] failing to pass command line switches to crosswalk-21.51.546.6

2016-10-27 Thread Milan Andric
Hi Raphael, thank you for that last post it was very helpful.

We also opened a Jira ticket
https://crosswalk-project.org/jira/browse/XWALK-7413 but in the
meantime we are compiling crosswalk with the chromium hack and have a
branch over here https://github.com/medic/chromium-crosswalk.

The reason we don't use the Quota API is because it's still not
implemented yet, for Chrome it requires being in the Origin Trial
program to enable it.

Milan
___
Crosswalk-help mailing list
Crosswalk-help@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help


Re: [Crosswalk-help] failing to pass command line switches to crosswalk-21.51.546.6

2016-10-25 Thread Raphael Kubo da Costa
Milan Andric  writes:
> On Mon, Oct 24, 2016 at 4:24 AM, Raphael Kubo da Costa
>  wrote:
>
>>>
>>> Since I've never built Chromium before, do you have any tips on
>>> building Crosswalk
>>> with a custom Chromium so I can enable the unlimited storage option?
>>
>> I'm not sure I follow: --unlimited-storage is only defined and
>> interpreted in the chrome/ layer (the parts that make up the actual
>> "chrome" browser binary), which is not used by Crosswalk, so you either
>> need to patch only Chromium itself (in which case you wouldn't need
>> Crosswalk) or patch Crosswalk to provide functionality similar to that
>> Chrome provides (in which case you wouldn't need to patch Chrome).
>
> Hi Raphael,

Hey there,

> Since I'm not a Crosswalk or Chromium developer I'm a little confused
> at how the command line switches are being handled and why they don't
> get passed directly to Chrome.   I would expect it to work similar to
> a Chrome build on your desktop.

Let me try to summarize it very quickly: the Chromium browser (ie. the
open source version of the Google Chrome browser) is built upon several
separate layers of code, and (theoretically) the lower layers are
unaware of the ones on top. For example, the media stack is implemented
in media/, the network stack is in net/, an API layer that orchestrates
all those bits below and allows one to display a web page is in content/
and, finally, chrome/ contains the code for the actual browser. It's the
part that manages profiles, implements the browser GUI and a ton of
other things.

Most Chromium-derived projects (Crosswalk, some toolkit WebView-like
APIs, NW.js etc) interact with Chromium via the content/ layer and the
ones below it, but not chrome/ itself, since they are not trying to
implement a browser themselves. Since handling of --unlimited-storage is
implemented in chrome/ (in code that manipulates extensions, actually),
passing it via Crosswalk has no effect.

> Can you please explain a little on how we add support in Crosswalk for
> a new/unsupported Chromium command-line option like
> `--unlimited-storage`?

The first step is always to create a ticket in our issue tracker
(crosswalk-project.org/jira) so it does not end up forgotten in the
mailing list archives.

Then someone needs to look at how it is implemented in Chromium and see
if it is possible to do the same in Crosswalk; it is possible that doing
so requires changing Chromium (and in which case the changes should be
upstreamed).

This all takes time, so I feel it's important to ask if you've
considered other ways to implement your app without localStorage (by
using the Quota API spec, for example).
___
Crosswalk-help mailing list
Crosswalk-help@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help


Re: [Crosswalk-help] failing to pass command line switches to crosswalk-21.51.546.6

2016-10-24 Thread Milan Andric
On Mon, Oct 24, 2016 at 4:24 AM, Raphael Kubo da Costa
 wrote:
>>
>> Since I've never built Chromium before, do you have any tips on
>> building Crosswalk
>> with a custom Chromium so I can enable the unlimited storage option?
>
> I'm not sure I follow: --unlimited-storage is only defined and
> interpreted in the chrome/ layer (the parts that make up the actual
> "chrome" browser binary), which is not used by Crosswalk, so you either
> need to patch only Chromium itself (in which case you wouldn't need
> Crosswalk) or patch Crosswalk to provide functionality similar to that
> Chrome provides (in which case you wouldn't need to patch Chrome).

Hi Raphael,

Since I'm not a Crosswalk or Chromium developer I'm a little confused
at how the command line switches are being handled and why they don't
get passed directly to Chrome.   I would expect it to work similar to
a Chrome build on your desktop.

Can you please explain a little on how we add support in Crosswalk for
a new/unsupported Chromium command-line option like
`--unlimited-storage`?

Milan
___
Crosswalk-help mailing list
Crosswalk-help@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help


Re: [Crosswalk-help] failing to pass command line switches to crosswalk-21.51.546.6

2016-10-24 Thread Raphael Kubo da Costa
Milan Andric  writes:
>> The reason for trying --unlimited-storage is so our app does not
>> run out of storage space on the android device.  We use the browser's
>> LocalStorage and hit limitations in our current app that uses the native
>> Android WebView so we are trying to bundle chrome in a way that it does not
>> have the same storage limitations, so it can use all the storage available on
>> the device.

[...]

>> If Crosswalk does not support the --unlimited-storage flag I will probably
>> look at patching the Chrome source code.
>>
>
> Since I've never built Chromium before, do you have any tips on
> building Crosswalk
> with a custom Chromium so I can enable the unlimited storage option?

I'm not sure I follow: --unlimited-storage is only defined and
interpreted in the chrome/ layer (the parts that make up the actual
"chrome" browser binary), which is not used by Crosswalk, so you either
need to patch only Chromium itself (in which case you wouldn't need
Crosswalk) or patch Crosswalk to provide functionality similar to that
Chrome provides (in which case you wouldn't need to patch Chrome).
___
Crosswalk-help mailing list
Crosswalk-help@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help


Re: [Crosswalk-help] failing to pass command line switches to crosswalk-21.51.546.6

2016-10-20 Thread Milan Andric
Hi Raphael, one question below...

On Mon, Oct 17, 2016 at 11:28 AM, Milan Andric  wrote:
>
> Hi Raphael,
>
> The reason for trying --unlimited-storage is so our app does not
> run out of storage space on the android device.  We use the browser's
> LocalStorage and hit limitations in our current app that uses the native
> Android WebView so we are trying to bundle chrome in a way that it does not
> have the same storage limitations, so it can use all the storage available on
> the device.
>
> We have projects where we deploy these devices in rural health care
> environments.  The device's primary function is to run the application we
> deploy and the browser's storage limitations leave most of the device's
> resources unused.  This --unlimited-storage flag works on the desktop and
> seemed to be the easiest way to provide the additional storage resources.
>
> If Crosswalk does not support the --unlimited-storage flag I will probably
> look at patching the Chrome source code.
>

Since I've never built Chromium before, do you have any tips on
building Crosswalk
with a custom Chromium so I can enable the unlimited storage option?

Thanks again,

Milan
___
Crosswalk-help mailing list
Crosswalk-help@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help


Re: [Crosswalk-help] failing to pass command line switches to crosswalk-21.51.546.6

2016-10-17 Thread Milan Andric
Response below...

On Mon, Oct 17, 2016 at 5:35 AM, Raphael Kubo da Costa
 wrote:
> Milan Andric  writes:
>
>> Hi Folks!
>>
>> I'm failing to get chromium command line switches to work with
>> crosswalk-21.51.546.6. I'm using the embedded style, testing with the
>> default android project generated from the crosswalk-app
>> (crosswalk-app-tools on npm).
>>
>> Is there a way to have xwalk or chromium log the command line switcches it
>> is using when it launches?  I tested the command line switches on the
>> desktop version of Chrome 53 and 51 and they work as expected.  Is there a
>> recommended way to test/debug this?  Like a command line switch that is
>> definitely supported in the latest xwalk release and makes it very evident
>> that it was passed in?
>>
>> I also tried the more conventional routes using the manifest.json property
>> "xwalk_command_line" and the "xwalk-command-line" file in the assets
>> folder.  They all failed for me.
>>
>> Here is the main Activity class:
>> https://gist.github.com/mandric/7bf05e750d7ed3b5f907c4fb44abdd8e
>
> Hi,
>
> The recommended way to pass additional flags to Crosswalk or Chromium is
> indeed xwalk_command_line or xwalk-command-line.
>
> In this case, I think you're having problems because both --user-agent
> and --unlimited-storage are Chrome-the-browser flags. Technically
> speaking, they are defined and interpreted in src/chrome/, which means
> they won't really have an effect in Crosswalk.
>
> In your snippet you mention you want to get --unlimited-storage to work;
> can you elaborate on the reason? Perhaps we can find another way to
> achieve the same result.

Hi Raphael,

The reason for trying --unlimited-storage is so our app does not
run out of storage space on the android device.  We use the browser's
LocalStorage and hit limitations in our current app that uses the native
Android WebView so we are trying to bundle chrome in a way that it does not
have the same storage limitations, so it can use all the storage available on
the device.

We have projects where we deploy these devices in rural health care
environments.  The device's primary function is to run the application we
deploy and the browser's storage limitations leave most of the device's
resources unused.  This --unlimited-storage flag works on the desktop and
seemed to be the easiest way to provide the additional storage resources.

If Crosswalk does not support the --unlimited-storage flag I will probably
look at patching the Chrome source code.

Thanks for your response,

Milan
___
Crosswalk-help mailing list
Crosswalk-help@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help


Re: [Crosswalk-help] failing to pass command line switches to crosswalk-21.51.546.6

2016-10-17 Thread Raphael Kubo da Costa
Milan Andric  writes:

> Hi Folks!
>
> I'm failing to get chromium command line switches to work with
> crosswalk-21.51.546.6. I'm using the embedded style, testing with the
> default android project generated from the crosswalk-app
> (crosswalk-app-tools on npm).
>
> Is there a way to have xwalk or chromium log the command line switcches it
> is using when it launches?  I tested the command line switches on the
> desktop version of Chrome 53 and 51 and they work as expected.  Is there a
> recommended way to test/debug this?  Like a command line switch that is
> definitely supported in the latest xwalk release and makes it very evident
> that it was passed in?
>
> I also tried the more conventional routes using the manifest.json property
> "xwalk_command_line" and the "xwalk-command-line" file in the assets
> folder.  They all failed for me.
>
> Here is the main Activity class:
> https://gist.github.com/mandric/7bf05e750d7ed3b5f907c4fb44abdd8e

Hi,

The recommended way to pass additional flags to Crosswalk or Chromium is
indeed xwalk_command_line or xwalk-command-line.

In this case, I think you're having problems because both --user-agent
and --unlimited-storage are Chrome-the-browser flags. Technically
speaking, they are defined and interpreted in src/chrome/, which means
they won't really have an effect in Crosswalk.

In your snippet you mention you want to get --unlimited-storage to work;
can you elaborate on the reason? Perhaps we can find another way to
achieve the same result.
___
Crosswalk-help mailing list
Crosswalk-help@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help