<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">I'm pretty new to the
mailing list and the project, but I'm pretty sure that starting a new
Chrome instance for every launched activity is far too taxing for the
XOs.<br>
<br>
I think that Lionel's idea of using a Python activity that uses the
WebKit WebView is a much, much better solution.<br>
<br>
<blockquote style="border: 0px none;"
cite="mid:00fc01ce37bd$7a4ac470$6ee04d50$@olpc-france.org" type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="lionel@olpc-france.org" photoname=""
src="cid:part1.09020600.05080107@worrbase.com"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:lionel@olpc-france.org"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">lionel@olpc-france.org</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">April 12, 2013
4:36 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><meta content="text/html;
charset=ISO-8859-1" http-equiv="Content-Type"><meta content="Microsoft
Word 15 (filtered medium)" name="Generator"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1156073504;
mso-list-type:hybrid;
mso-list-template-ids:528244396 -1922685288 67895299 67895301 67895297 67895299 67895301 67895297 67895299 67895301;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--><div class="WordSection1"><p
class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p><p
class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Hi
Daniel,<o:p></o:p></span></p><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p><p
class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">Impressive idea with a cool architecture. BTW, to be
honest I think it’s… too complex.<o:p></o:p></span></p><p
class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">Why not just create a standard Python activity template
that call the WebKit WebView? Like we do today.<o:p></o:p></span></p><p
class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">But maybe I miss something or maybe we don’t speak of the
same thing?<o:p></o:p></span></p><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">When I wrote the GSoC proposal, I think to a two steps
process.<o:p></o:p></span></p><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">What I call the “first step” is just to create an activity
template with a full screen WebView control and a Sugar to JavaScript.<o:p></o:p></span></p><p
class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">So it’s like my work on Enyo today but:<o:p></o:p></span></p><p
style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"
class="MsoListParagraph"><!--[if !supportLists]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><span style="mso-list:Ignore">-<span style="font:7.0pt
"Times New Roman""> </span></span></span><!--[endif]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">With a better way than “console-message” to communicate
between JavaScript & Sugar,<o:p></o:p></span></p><p
style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"
class="MsoListParagraph"><!--[if !supportLists]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><span style="mso-list:Ignore">-<span style="font:7.0pt
"Times New Roman""> </span></span></span><!--[endif]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">With a JavaScript/CSS framework to reproduce in HTML5 the
Sugar Look&Feel and sugar.graphics stuff,<o:p></o:p></span></p><p
style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"
class="MsoListParagraph"><!--[if !supportLists]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><span style="mso-list:Ignore">-<span style="font:7.0pt
"Times New Roman""> </span></span></span><!--[endif]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">With a JavaScript framework that allow calling all Sugar
features (telepathy, data store, l10n, drag&drop, …).<o:p></o:p></span></p><p
class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">We could probably do all these things without lot of
change on current Sugar implementation and current Sugar activity way of
working. In my mind, this could work even on Sugar 0.96-0.98 without
any change!<o:p></o:p></span></p><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">Except if I’m wrong, what you’re currently describe is the
“second step”: upgrading Sugar to support directly HTML5 activities.<o:p></o:p></span></p><p
class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">In this second step we could imagine that Sugar will be
very different than today (may be an Android layer or a Chromium layer)
and that no current Python activities will work on it. BTW HTML5
activities built with the “first step framework” should be very easy to
adapt: just need to change the JavaScript framework implementation to
use natives features instead of Sugar Python features (for example: call
HTML5 storage instead of Datastore storage) and remove the XO
Manifest/Package. I do like your architecture proposal for this second
step but it’s difficult to me to think to this second step without we’ve
got a more precise view of the first step.<o:p></o:p></span></p><p
class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"> Lionel.<o:p></o:p></span></p><p
class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-US"><o:p> </o:p></span></p><p
class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">De :</span></b><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
Daniel Narvaez [<a class="moz-txt-link-freetext" href="mailto:dwnarvaez@gmail.com">mailto:dwnarvaez@gmail.com</a>] <br><b>Envoyé :</b> jeudi
11 avril 2013 21:52<br><b>À :</b> <a class="moz-txt-link-abbreviated" href="mailto:sugar-devel@lists.sugarlabs.org">sugar-devel@lists.sugarlabs.org</a><br><b>Cc :</b>
Lionel Laské<br><b>Objet :</b> Chromium integration inside the sugar
shell (was Re: Kicking off HTML5 activities work)<o:p></o:p></span></p><p
class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">Hello,<br><br>I
spent some time today thinking and experimenting with Chromium
integration and I have a more detailed plan to propose now.<br><br>There
is an important premise to be made. In both Chromium and Firefox OS,
application's installation is very much in the hands of the web browser.
It happens as the result of a user clicking on a button, inside a web
store. Chromium is a bit more flexible but the other possibilities are
basically just developer tools.<br>I think this limits our possibilities
a lot. We need to use the browser applications management, rather then
installing applications ourselves and then launching them with some
command line option. Of course Chromium is open source and we could
develop the stuff which is missing. But, in my opinion it's just too
much work and it's going to be a pain to maintain in the future, core
developers are not going to care about it, given it's not important for
their products.<br><br>That said, I think I mostly figured out a plan to
integrate with Chromium web apps management, without having to write a
lot of code.<br><br>* Chromium is started up with the sugar session,
using the --no-startup-window, to make it invisible. The sugar extension
has a "background" permission, which will keep it running even with no
windows.<br>* The extension runs a python script, using
chrome.runtime.connectNative. Communication uses json-rpc wrapped in the
message protocol supported by the extension. The python script fetches
the list of installed activities (as exposed by
chrome.management.getAll) and listen to changes.<br>* The python script
exposes a dbus service, allowing the sugar shell to get the list of
installed applications and to display icons for them in the home. We use
GIOChannel to read stdin, so that we don't block and integrate with the
glib mainloop.<br>* When the user click on an icon, a LaunchApplication
is called on the dbus service, which proxies it to the extension, which
launches the application. We will probably need a trivial patch to
chromium to start it without UI. There is already a define for chromeos,
but it's a compile time thing (in extension_prefs.cc,
GetLaunchContainer).<br>* The shell notices that a new window has been
opened and associates it with the application information. This allows
to activate and close the activity as necessary.<br>* Uninstalling an
activity works in the same way as launching. Shell -> python script
-> extension.<br>* Implementation of collaboration and datastore
libraries could also be based on the python script messaging.<br><br>I
implemented (badly) a good part of this and I didn't find fundamental
problems with it. Except for one, which is not specific to this plan.
Sugar supports multiple instances of the same activity, web application
frameworks doesn't. How are we going to deal with that? I haven't
thought much about it yet, but it seems something we want to be very
clear about.<o:p></o:p></p></div><div>_______________________________________________<br>Sugar-devel
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br><a class="moz-txt-link-freetext" href="http://lists.sugarlabs.org/listinfo/sugar-devel">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br></div></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="dwnarvaez@gmail.com" photoname="Daniel Narvaez"
src="cid:part1.09020600.05080107@worrbase.com"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:dwnarvaez@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Daniel Narvaez</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">April 11, 2013
3:52 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">Hello,<br><br>I spent some time
today thinking and experimenting with Chromium integration and I have a
more detailed plan to propose now.<br><br>There is an important premise
to be made. In both Chromium and Firefox OS, application's installation
is very much in the hands of the web browser. It happens as the result
of a user clicking on a button, inside a web store. Chromium is a bit
more flexible but the other possibilities are basically just developer
tools.<br>
I think this limits our possibilities a lot. We need to use the browser
applications management, rather then installing applications ourselves
and then launching them with some command line option. Of course
Chromium is open source and we could develop the stuff which is missing.
But, in my opinion it's just too much work and it's going to be a pain
to maintain in the future, core developers are not going to care about
it, given it's not important for their products.<br>
<br>That said, I think I mostly figured out a plan to integrate with
Chromium web apps management, without having to write a lot of code.<br><br>*
Chromium is started up with the sugar session, using the
--no-startup-window, to make it invisible. The sugar extension has a
"background" permission, which will keep it running even with no
windows.<br>
* The extension runs a python script, using
chrome.runtime.connectNative. Communication uses json-rpc wrapped in the
message protocol supported by the extension. The python script fetches
the list of installed activities (as exposed by
chrome.management.getAll) and listen to changes.<br>
* The python script exposes a dbus service, allowing the sugar shell to
get the list of installed applications and to display icons for them in
the home. We use GIOChannel to read stdin, so that we don't block and
integrate with the glib mainloop.<br>
* When the user click on an icon, a LaunchApplication is called on the
dbus service, which proxies it to the extension, which launches the
application. We will probably need a trivial patch to chromium to start
it without UI. There is already a define for chromeos, but it's a
compile time thing (in extension_prefs.cc, GetLaunchContainer).<br>
* The shell notices that a new window has been opened and associates it
with the application information. This allows to activate and close the
activity as necessary.<br>* Uninstalling an activity works in the same
way as launching. Shell -> python script -> extension.<br>
* Implementation of collaboration and datastore libraries could also be
based on the python script messaging.<br><br>I implemented (badly) a
good part of this and I didn't find fundamental problems with it. Except
for one, which is not specific to this plan. Sugar supports multiple
instances of the same activity, web application frameworks doesn't. How
are we going to deal with that? I haven't thought much about it yet, but
it seems something we want to be very clear about.<br>
<div>_______________________________________________<br>Sugar-devel
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br><a class="moz-txt-link-freetext" href="http://lists.sugarlabs.org/listinfo/sugar-devel">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br></div></div>
</blockquote>
</body></html>