Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Issue 14758008: Update the HTML Media Capture implementation. (Closed)

Created:
7 years, 7 months ago by Raphael Kubo da Costa (rakuco)
Modified:
7 years, 5 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Update the HTML Media Capture implementation. In the latest version of the spec, the `capture' attribute is now a boolean which simply indicates whether the device's capabilities should be used or not (choosing between cameras, microphones etc is up to the user agent based on the contents of the `accept' attribute). This particular patch updates the type of the `capture' member of content::FileChooserParams by passing an std::pair consisting of a vector of MIME types passed to the `accept' attribute of the <input> tag and a boolean corresponding to the `capture' attribute. The behavior in Android has been slightly changed due to how the spec change. Namely: o Sites that specify only the "capture" attribute setting the "accept" attribute will now get a generic picker. o Sites that specify the "capture" attribute and pass "*/*" to "accept" will now get a generic picker. o Sites that specify the "capture" and multiple MIME types for the "accept" attribute will now get a generic picker. R=abarth@chromium.org,beverloo@chromium.org,bulach@chromium.org,tedchoc@chromium.org,eseidel@chromium.org BUG=240252 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210553

Patch Set 1 #

Patch Set 2 : s/bool/boolean/ in the Java code #

Patch Set 3 : Address the concerns benm raised on the bug #

Total comments: 5

Patch Set 4 : Fix some minor issues #

Patch Set 5 : Rebase after r200457 #

Patch Set 6 : Get rid of the ifdefs #

Patch Set 7 : Minor adjustments #

Total comments: 4

Patch Set 8 : Move the policy decisions to the Java side #

Total comments: 3

Patch Set 9 : Adjust coding style #

Total comments: 6

Patch Set 10 : Minor style fix #

Patch Set 11 : Remove local variable #

Total comments: 1

Patch Set 12 : Use proper Java #

Patch Set 13 : Build fix attempt. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -39 lines) Patch
M chrome/browser/file_select_helper.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M content/public/common/file_chooser_params.h View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M ui/android/java/src/org/chromium/ui/SelectFileDialog.java View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +13 lines, -18 lines 0 comments Download
M ui/shell_dialogs/select_file_dialog_android.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -15 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
Raphael Kubo da Costa (rakuco)
7 years, 7 months ago (2013-05-13 15:22:55 UTC) #1
Peter Beverloo
+joth for WebView As far as I understand it, Safari never supported any values for ...
7 years, 7 months ago (2013-05-13 15:37:57 UTC) #2
Peter Beverloo
I replied to the bug because that's probably a better forum to discuss that concern.
7 years, 7 months ago (2013-05-13 15:40:12 UTC) #3
joth
+benm
7 years, 7 months ago (2013-05-13 16:24:20 UTC) #4
Raphael Kubo da Costa (rakuco)
Patch v3 is up, and makes the behavior a bit more compatible with the existing ...
7 years, 7 months ago (2013-05-14 15:32:53 UTC) #5
joth
https://codereview.chromium.org/14758008/diff/10001/content/public/common/file_chooser_params.h File content/public/common/file_chooser_params.h (right): https://codereview.chromium.org/14758008/diff/10001/content/public/common/file_chooser_params.h#newcode52 content/public/common/file_chooser_params.h:52: // If true, the data should be obtained using ...
7 years, 7 months ago (2013-05-15 20:03:59 UTC) #6
Raphael Kubo da Costa (rakuco)
> content/public/common/file_chooser_params.h:53: // TODO(jrg): upstream > SelectFileDialog.java! Currently lives in chrome/. > this TODO is ...
7 years, 7 months ago (2013-05-15 22:05:19 UTC) #7
joth
On 15 May 2013 15:05, <raphael.kubo.da.costa@intel.com> wrote: > content/public/common/file_**chooser_params.h:53: // TODO(jrg): upstream >> SelectFileDialog.java! Currently ...
7 years, 7 months ago (2013-05-22 21:19:54 UTC) #8
benm (inactive)
On 2013/05/22 21:19:54, joth wrote: > On 15 May 2013 15:05, <mailto:raphael.kubo.da.costa@intel.com> wrote: > > ...
7 years, 7 months ago (2013-05-23 15:08:06 UTC) #9
Raphael Kubo da Costa (rakuco)
It's easier to address both comments together: > FWIW, you could probably avoid the ifdefs ...
7 years, 7 months ago (2013-05-23 21:59:32 UTC) #10
anssik
On 2013/05/23 21:59:32, Raphael Kubo da Costa (rakuco) wrote: > > Playing devil's advocate, as ...
7 years, 7 months ago (2013-05-24 08:50:23 UTC) #11
joth
On 23 May 2013 14:59, <raphael.kubo.da.costa@intel.com> wrote: > It's easier to address both comments together: ...
7 years, 7 months ago (2013-05-25 02:20:34 UTC) #12
Raphael Kubo da Costa (rakuco)
> I must be missing something obvious. > But AFAICT, with you new implementation upon ...
7 years, 7 months ago (2013-05-25 09:24:26 UTC) #13
Raphael Kubo da Costa (rakuco)
Let's try to get the ball rolling again. I have uploaded new patch versions to ...
7 years, 5 months ago (2013-07-02 15:39:36 UTC) #14
benm (inactive)
Looking on this with fresh eyes from last time, I think this more or less ...
7 years, 5 months ago (2013-07-02 20:45:29 UTC) #15
Raphael Kubo da Costa (rakuco)
On 2013/07/02 20:45:29, benm wrote: > WDYT? Sounds entirely reasonable to me :-) I've updated ...
7 years, 5 months ago (2013-07-03 13:44:48 UTC) #16
joth
https://codereview.chromium.org/14758008/diff/32001/ui/shell_dialogs/select_file_dialog_android.cc File ui/shell_dialogs/select_file_dialog_android.cc (right): https://codereview.chromium.org/14758008/diff/32001/ui/shell_dialogs/select_file_dialog_android.cc#newcode75 ui/shell_dialogs/select_file_dialog_android.cc:75: // The latest version of the HTML Media Capture ...
7 years, 5 months ago (2013-07-03 17:41:42 UTC) #17
Raphael Kubo da Costa (rakuco)
On 2013/07/03 17:41:42, joth wrote: > Can't we go the full way and pass 'has_capture_attribute' ...
7 years, 5 months ago (2013-07-04 15:05:34 UTC) #18
joth
lgtm thanks! https://codereview.chromium.org/14758008/diff/40001/ui/android/java/src/org/chromium/ui/SelectFileDialog.java File ui/android/java/src/org/chromium/ui/SelectFileDialog.java (right): https://codereview.chromium.org/14758008/diff/40001/ui/android/java/src/org/chromium/ui/SelectFileDialog.java#newcode88 ui/android/java/src/org/chromium/ui/SelectFileDialog.java:88: getContentIntent.setType("image/*"); (patch creep) this could be ALL_IMAGE_TYPES ...
7 years, 5 months ago (2013-07-04 16:55:21 UTC) #19
Raphael Kubo da Costa (rakuco)
On 2013/07/04 16:55:21, joth wrote: > lgtm thanks! > > https://codereview.chromium.org/14758008/diff/40001/ui/android/java/src/org/chromium/ui/SelectFileDialog.java > File ui/android/java/src/org/chromium/ui/SelectFileDialog.java (right): ...
7 years, 5 months ago (2013-07-04 17:45:06 UTC) #20
Raphael Kubo da Costa (rakuco)
+jam,ben,sky
7 years, 5 months ago (2013-07-04 17:46:11 UTC) #21
joth
jam@ for content/, sky@ can cover chrome/ and ui/ I think ? (So ben G ...
7 years, 5 months ago (2013-07-04 18:09:06 UTC) #22
jam
lgtm
7 years, 5 months ago (2013-07-08 21:09:29 UTC) #23
sky
https://codereview.chromium.org/14758008/diff/49001/ui/shell_dialogs/select_file_dialog_android.cc File ui/shell_dialogs/select_file_dialog_android.cc (right): https://codereview.chromium.org/14758008/diff/49001/ui/shell_dialogs/select_file_dialog_android.cc#newcode72 ui/shell_dialogs/select_file_dialog_android.cc:72: accept_types = *(reinterpret_cast<AcceptTypes*>(params)); spacing is off here. https://codereview.chromium.org/14758008/diff/49001/ui/shell_dialogs/select_file_dialog_android.cc#newcode77 ui/shell_dialogs/select_file_dialog_android.cc:77: ...
7 years, 5 months ago (2013-07-08 21:13:50 UTC) #24
Raphael Kubo da Costa (rakuco)
https://codereview.chromium.org/14758008/diff/49001/ui/shell_dialogs/select_file_dialog_android.cc File ui/shell_dialogs/select_file_dialog_android.cc (right): https://codereview.chromium.org/14758008/diff/49001/ui/shell_dialogs/select_file_dialog_android.cc#newcode72 ui/shell_dialogs/select_file_dialog_android.cc:72: accept_types = *(reinterpret_cast<AcceptTypes*>(params)); On 2013/07/08 21:13:51, sky wrote: > ...
7 years, 5 months ago (2013-07-08 21:27:00 UTC) #25
sky
https://codereview.chromium.org/14758008/diff/49001/ui/shell_dialogs/select_file_dialog_android.cc File ui/shell_dialogs/select_file_dialog_android.cc (right): https://codereview.chromium.org/14758008/diff/49001/ui/shell_dialogs/select_file_dialog_android.cc#newcode77 ui/shell_dialogs/select_file_dialog_android.cc:77: bool has_capture_attribute = accept_types.second; On 2013/07/08 21:27:01, Raphael Kubo ...
7 years, 5 months ago (2013-07-08 21:32:32 UTC) #26
Raphael Kubo da Costa (rakuco)
https://codereview.chromium.org/14758008/diff/49001/ui/shell_dialogs/select_file_dialog_android.cc File ui/shell_dialogs/select_file_dialog_android.cc (right): https://codereview.chromium.org/14758008/diff/49001/ui/shell_dialogs/select_file_dialog_android.cc#newcode77 ui/shell_dialogs/select_file_dialog_android.cc:77: bool has_capture_attribute = accept_types.second; On 2013/07/08 21:32:32, sky wrote: ...
7 years, 5 months ago (2013-07-08 21:38:12 UTC) #27
Ted C
https://codereview.chromium.org/14758008/diff/58001/ui/android/java/src/org/chromium/ui/SelectFileDialog.java File ui/android/java/src/org/chromium/ui/SelectFileDialog.java (right): https://codereview.chromium.org/14758008/diff/58001/ui/android/java/src/org/chromium/ui/SelectFileDialog.java#newcode215 ui/android/java/src/org/chromium/ui/SelectFileDialog.java:215: return mFileTypes.size() == 1 && mFileTypes.at(0).equals(type); I don't think ...
7 years, 5 months ago (2013-07-08 21:50:56 UTC) #28
Raphael Kubo da Costa (rakuco)
Thanks for the comments. My ISP has decided to go offline in the middle of ...
7 years, 5 months ago (2013-07-08 22:45:19 UTC) #29
sky
LGTM
7 years, 5 months ago (2013-07-09 00:14:10 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raphael.kubo.da.costa@intel.com/14758008/65001
7 years, 5 months ago (2013-07-09 11:05:16 UTC) #31
commit-bot: I haz the power
7 years, 5 months ago (2013-07-09 14:06:53 UTC) #32
Message was sent while issue was closed.
Change committed as 210553

Powered by Google App Engine
This is Rietveld 408576698