Chrome as Desktop app Runtime (few shortcomings)

1,514 views
Skip to first unread message

Ramki Gaddipati

unread,
Sep 18, 2011, 8:11:04 AM9/18/11
to Chromium-discuss
Chrome has an app mode (chrome.exe --app-id=extension-id) in which we
can launch an application (chrome extension) in a dedicated window.
This will also strip-off chrome menus, address bar and other frills
giving the entire canvas for the app, so that developer can give a
near desktop app feel. So far so good.

Some of the issues that come in the way of giving a complete desktop
view are:
1. 'Leave this page' Dialog
2. 'Waiting for ...' blurb
3. Chrome's default keyboard shortcuts like Ctrl+T, Ctrl+F, Ctrl+J

Issues in detail:

'Leave this page' Dialog:
Although the app launches in a dedicated window, the app gets no
control over the window. The app cannot control the minimize, maximize
or close buttons shown on the window frame. It cannot introduce custom
behavior when a window is being closed. The only thing possible is to
handle the onbeforeunload event on the document and prompt the user to
not to close the window. With this approach too one ends up with a
dialog whose buttons read 'Leave this Page' or 'Stay on this Page'.
These phrases on buttons are not appropriate as the user perceives
this window to be an application but not a web page. Ideally, the
application should be able to have full control over this and should
be able to suppress the dialog entirely if it chooses to.

'Waiting for http://....':
Much like how the browser shows 'waiting for http://google.com...'
kind of blurbs on the lower left corner of the screen whenever it is
loading some resources on a web page, it shows the blurbs in the app
mode as well. I think, these blurbs are annoying in an application. So
is the spinner that appear in the title bar when the page inside is
loading something, like an iframe.

Default keyboard shortcuts:
There is no way to override the default keyboard shortcuts like Ctrl
+T. Pressing Ctrl+T/Ctrl+N opens new window of chrome in app mode too.
My application has tabs and has an option to start a new transaction.
I would prefer to use Ctrl+T and Ctrl+N for in app actions.


Is it possible to change some or all of the above behaviors in the app
mode?
Giving window controlling capabilities for extensions, especially when
they are running in their own window, is perfectly fine, I think.

thanks,
+ramki

Caleb Eggensperger

unread,
Sep 18, 2011, 5:15:22 PM9/18/11
to ramki...@gmail.com, Chromium-discuss
(3) can be solved by the fix for crbug.com/84332

(1) and (2) are a little tricky; app mode is implemented such that a
user (at least on Windows; this hasn't made it to mac or linux afaik)
can turn any website into an app, not just a crx web app. So the
reasons for having the status bubble and the current .onbeforeunload
based API aren't really related to app mode; they make sense in app
mode just like they make sense in the normal browser tabs. I think you
could make an argument for an extension API to give more control over
closing the window, but I'm not sure if there's enough of a good
(non-malicious) use case.

> --
> Chromium Discussion mailing list: chromium...@chromium.org
> View archives, change email options, or unsubscribe:
>    http://groups.google.com/a/chromium.org/group/chromium-discuss
>

Ramki Gaddipati

unread,
Sep 26, 2011, 11:59:54 AM9/26/11
to Caleb Eggensperger, Chromium-discuss
Hi Caleb,

I was on a vacation and couldn't respond earlier.

If an application using Chrome's app mode is delivered to the user, it is likely that the user is communicated or impressed in some way or the other that she is working with an application, not a page. The fact that this application is using Chrome is seldom known to the user. In such a case a Dialog which reads "Are you sure you want to leave this Page?" with buttons "Leave this Page" and "Stay on this Page" is completely out of context and will confuse the user.

It is true that the app mode can let any webpage look like an application. However, what is the intended purpose of such a mode? Who expects Google search page to look like an application? The likely use case of this mode is for HTML5 applications which look and/or behave nearly same as their desktop technology based counterparts. As Chrome aims to be the preferred run time for such applications, it is critical to acknowledge the difference in perception of a user about an Application and a Page and accordingly provide developers with features to give a real application experience.

We are developing a Chat client which uses Chrome as the runtime. Almost all chat clients out there minimize to task bar or systray (in windows) when the user closes the main window but won't exit/die.  Users we interviewed can't do away with this behavior. It is annoying to the users if the app pops up a dialog every time they close the window and is catastrophic if the chat application dies on close of window. We need a way to minimize the window when users presses close button or presses alt+f4 -- non negotiable.  

I am sure, developers who might attempt to develop mail clients or any keep-me-available kind of apps like multi-player games will also run into similar requirement. I see numerous such non-malicious legitimate use-cases.
 
I have investigated the background page semantics of an extension. Although it will solve the problem of application dying on window close,  1. it makes the extension model based app significantly different from the app that can run from the web, 2. It cannot still give the minimized to task bar experience of the desktop apps.

I think, it is critical that a provision to suppress the 'Leave this Page' dialog be provided for applications either in the --app mode or through an extension API.

+ramki
Reply all
Reply to author
Forward
0 new messages