New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 845818 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocking:
issue 578890



Sign in to add a comment

[FR] Extending the file manager and SelectFileDialogExtension

Project Member Reported by je_julie.kim@chromium.org, May 23 2018

Issue description

Chrome Version: 66.0.3359.170
OS: linux

I'd like to ask your opinions about extending the file manager and the SelectFileDialogExtension.

As you know, Chromium has a file selection dialogs implementation using a native UI toolkit such as GTK but some lightweight embedded devices may not provide such interfaces like desktop.

I thought that the SelectFileDialogExtension could be one of the options because I'd like to make Chromium work on lightweight embedded devices, even if it's only available on ChromeOS now.

Igalia[1] implemented a first functional version, https://github.com/Igalia/chromium/pull/442, of file explorer dialogs support in Chromium/Wayland by reusing SelectFileDialogExtension, which allowed users to upload local files to web services and set location under Downloads folder to save data from web pages.

Briefly, I changed it with the steps below.
-Took file_manager and fileapi from 'chrome/browser/chromeos' folder to 'chrome/browser'.
-Made seperate resources for file_manager from chromeos_strings.grdp
-Made minimal features work on linux with blocking ARC, MTP, SMB and google drivder.
-Extended bundled JS bindings for linux.
-Opened Platform APIs for file manager for chromeos and linux.

[1]: We're working on wayland implementation, which is being upstreamed now. https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/ozone_overview.md#linux-desktop-waterfall and https://bugs.chromium.org/p/chromium/issues/detail?id=578890.
 

Comment 1 by sashab@chromium.org, May 23 2018

Cc: weifangsun@chromium.org
+weifang - is there a longer term vision for unifying file picker dialogs on non-ChromeOS?

Thanks for looking into this. Getting the File Manager to run on Linux is something we've looked into before as it would help improve our development & testing workflow. However, I have some questions...

(1) What are the exact use cases for SelectFileDialogExtension outside of ChromeOS? Is this only for Wayland? Are there that many users running Chrome that don't have a native UI toolkit?

(2) FileManagerPrivate is heavily dependent on ChromeOS (MTP, ARC, Drive, etc) and we have no plans to support these features on other platforms. We would have to split the API into Chrome- and ChromeOS-specific versions, and somehow detect this on the front-end to know which API to call, which would be difficult. Unless you had another idea?

(3) Is there a timeline for Wayland support? We're pretty full with features for M69, but this might be something we can look into in the future. We couldn't accept a patch that large but we could look into it and break it apart and implement it ourselves. We also have some other planned changes/refactors for the file picker in the pipeline, so we'd have to find where it best fits with those as well.
(1) What are the exact use cases for SelectFileDialogExtension outside of ChromeOS? Is this only for Wayland? Are there that many users running Chrome that don't have a native UI toolkit?
=> there are various solutions that make use of ozone/wayland today in production, which forcibly disable Chromium's Gtk+ support or do not have the toolkit available in their systems at all. To name a few, WebOS, Tizen (mobile, TV and and other low end embedded environments), AGL (Automotive Grade Linux,  https://www.automotivelinux.org/), and qtwebengine, all have chosen to adopt chromium as their Web solution, and do not have Gtk toolkit available on their systems. Such solutions need an alternative implementations for their dialog support.

(2) FileManagerPrivate is heavily dependent on ChromeOS (MTP, ARC, Drive, etc) and we have no plans to support these features on other platforms. We would have to split the API into Chrome- and ChromeOS-specific versions, and somehow detect this on the front-end to know which API to call, which would be difficult. Unless you had another idea?
=>I thought we could not split the APIs. We just make the front-end call the APIs without recognition. Even if we don't split the APIs, we have to keep separate implementation for linux and ChromeOS. For linux, it could just return when it doesn't support and the front-end might care the case when the function returns empty, false, or not supported. From the changes I shared before, it didn't split the APIs definition and kept the front-end side used on ChromeOS. I could share the demo video.

(3) Is there a timeline for Wayland support? We're pretty full with features for M69, but this might be something we can look into in the future. We couldn't accept a patch that large but we could look into it and break it apart and implement it ourselves. We also have some other planned changes/refactors for the file picker in the pipeline, so we'd have to find where it best fits with those as well.
=> We are upstreaming the patches required to support Wayland natively, and it is possible to launch a minimally functional Chromium/Wayland browser off of ToT today. The rough schedule to finish upstreaming is Q3, but work to unify X11 and Wayland code paths through Ozone will spawn through Q4.
I agree current patch is too big to upstream and I'd like to just show that it could be one of workable options to users couldn't use UI toolkit on their environment. In order to upstream it, I think we need to touch them more. BTW, It's great to hear that you're considering to enhance it. I hope this use cases we faced be also considered.
I attached video to show its working on linux. It's only allowed to explorer 'Downloads' folder.
FileSelectionExtension.mp4
946 KB View Download
Owner: weifangsun@chromium.org
Status: Assigned (was: Untriaged)
Assigning to Weifang for prioritization.
Blocking: 578890
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c2af1f3ddc17e21663e1202207bc130e14d7dfac

commit c2af1f3ddc17e21663e1202207bc130e14d7dfac
Author: Julie Jeongeun Kim <jkim@igalia.com>
Date: Sat Sep 01 02:56:19 2018

Create file_manager_strings.grdp to manage independently

This patch creates file_manager_strings.grdp as collecting file
manager strings from chromeos_strings.grdp to manage
independently.

It also moves sha1 for file manager already added at
chrome/app/chromeos_strings_grdp to
chrome/app/file_manager_strings_grdp

It's wrapped in <if expr="chromeos"> at generated_resources.grd.

TEST=tested manually

Bug: 845818
Change-Id: I3741871b2fe9e0d0aec8da10caa7f4ab3f20363a
Reviewed-on: https://chromium-review.googlesource.com/1195173
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#588255}
[modify] https://crrev.com/c2af1f3ddc17e21663e1202207bc130e14d7dfac/chrome/app/chromeos_strings.grdp
[add] https://crrev.com/c2af1f3ddc17e21663e1202207bc130e14d7dfac/chrome/app/file_manager_strings.grdp
[rename] https://crrev.com/c2af1f3ddc17e21663e1202207bc130e14d7dfac/chrome/app/file_manager_strings_grdp/IDS_FILE_BROWSER_ANDROID_FILES_ROOT_LABEL.png.sha1
[rename] https://crrev.com/c2af1f3ddc17e21663e1202207bc130e14d7dfac/chrome/app/file_manager_strings_grdp/IDS_FILE_BROWSER_MY_FILES_ROOT_LABEL.png.sha1
[rename] https://crrev.com/c2af1f3ddc17e21663e1202207bc130e14d7dfac/chrome/app/file_manager_strings_grdp/IDS_FILE_BROWSER_SHOW_ALL_ANDROID_FOLDERS_OPTION.png.sha1
[modify] https://crrev.com/c2af1f3ddc17e21663e1202207bc130e14d7dfac/chrome/app/generated_resources.grd

Sign in to add a comment