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

Issue 2667803002: Picker takes a vector of pairs, and passes back the user chosen target. (Closed)

Created:
3 years, 10 months ago by constantina
Modified:
3 years, 10 months ago
Reviewers:
Matt Giuca, sky
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Picker takes a vector of pairs, and passes back the user chosen target. Instead of vector of string16s, input is a vector of pairs of string16 and GURL where the first element is the app name, and the second is the manifest URL of the app. The manifest URL of the chosen target is passed back via a callback as a string. The passed URL is Optional, so it can be null if the share is cancelled. BUG=668389 Review-Url: https://codereview.chromium.org/2667803002 Cr-Commit-Position: refs/heads/master@{#448512} Committed: https://chromium.googlesource.com/chromium/src/+/e4c513e7ae3fd3a6c7752f8add47b93fb1c66444

Patch Set 1 #

Patch Set 2 : Change tests to check chosen target #

Patch Set 3 : Rebase mgiuca@ patch #

Patch Set 4 : Simplify test #

Patch Set 5 : Move replacing of placeholders to after picker #

Total comments: 11

Patch Set 6 : Rebase #

Patch Set 7 : Fix upstream #

Patch Set 8 : Fix things that slipped through rebase cracks #

Total comments: 2

Patch Set 9 : Fixed, as per feedback #

Patch Set 10 : Fix another reference from enum to optional #

Patch Set 11 : Check a target is selected #

Patch Set 12 : Enable share button, only if target selected #

Total comments: 21

Patch Set 13 : Fixed, as per feedback. #

Total comments: 2

Patch Set 14 : Fixed nits #

Patch Set 15 : Pass vector of pairs of name and manifest URLs to UI #

Patch Set 16 : Update documentation #

Patch Set 17 : Pass vector of string16 and gurl, and return optional string #

Total comments: 14

Patch Set 18 : Rebase-update #

Patch Set 19 : Fixed, as per feedback #

Total comments: 4

Patch Set 20 : Dynamically enable/disable button #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -54 lines) Patch
M chrome/browser/ui/browser_dialogs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/webshare/webshare_target_picker_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +21 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/webshare/webshare_target_picker_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +38 lines, -13 lines 0 comments Download
M chrome/browser/webshare/share_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +6 lines, -10 lines 0 comments Download
M chrome/browser/webshare/share_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +18 lines, -11 lines 0 comments Download
M chrome/browser/webshare/share_service_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +10 lines, -7 lines 0 comments Download

Messages

Total messages: 53 (21 generated)
constantina
mgiuca@chromium.org: Please review changes in chrome/browser/webshare sky@chromium.org: Please review changes in chrome/browser (browser_dialogs.h and views ...
3 years, 10 months ago (2017-01-31 03:40:29 UTC) #4
sky
https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/ui/browser_dialogs.h File chrome/browser/ui/browser_dialogs.h (right): https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/ui/browser_dialogs.h#newcode157 chrome/browser/ui/browser_dialogs.h:157: // titles that will be shown in a list. ...
3 years, 10 months ago (2017-01-31 05:22:32 UTC) #9
Matt Giuca
https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/webshare/share_service_impl.cc File chrome/browser/webshare/share_service_impl.cc (right): https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/webshare/share_service_impl.cc#newcode156 chrome/browser/webshare/share_service_impl.cc:156: callback.Run(base::Optional<std::string>("Share was cancelled")); On 2017/01/31 05:22:32, sky wrote: > ...
3 years, 10 months ago (2017-01-31 07:28:02 UTC) #10
sky
Shouldn't the outgoing one get an enum for the error and have it up to ...
3 years, 10 months ago (2017-01-31 18:12:16 UTC) #11
constantina
That is a valid point that has been raised before, but as Matt said, the ...
3 years, 10 months ago (2017-01-31 23:29:30 UTC) #12
constantina
https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/ui/browser_dialogs.h File chrome/browser/ui/browser_dialogs.h (right): https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/ui/browser_dialogs.h#newcode157 chrome/browser/ui/browser_dialogs.h:157: // titles that will be shown in a list. ...
3 years, 10 months ago (2017-01-31 23:29:42 UTC) #13
Matt Giuca
https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc File chrome/browser/ui/views/webshare/webshare_target_picker_view.cc (right): https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc#newcode85 chrome/browser/ui/views/webshare/webshare_target_picker_view.cc:85: close_callback_.Run(GetText(table_->FirstSelectedRow(), 0)); On 2017/01/31 23:29:42, constantina wrote: > On ...
3 years, 10 months ago (2017-01-31 23:48:27 UTC) #14
sky
https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc File chrome/browser/ui/views/webshare/webshare_target_picker_view.cc (right): https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc#newcode85 chrome/browser/ui/views/webshare/webshare_target_picker_view.cc:85: close_callback_.Run(GetText(table_->FirstSelectedRow(), 0)); On 2017/01/31 23:48:27, Matt Giuca wrote: > ...
3 years, 10 months ago (2017-02-01 00:51:33 UTC) #15
constantina
https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc File chrome/browser/ui/views/webshare/webshare_target_picker_view.cc (right): https://codereview.chromium.org/2667803002/diff/80001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc#newcode85 chrome/browser/ui/views/webshare/webshare_target_picker_view.cc:85: close_callback_.Run(GetText(table_->FirstSelectedRow(), 0)); On 2017/02/01 00:51:33, sky wrote: > On ...
3 years, 10 months ago (2017-02-01 01:06:02 UTC) #16
sky
That's confusing. The accept key should only be enabled if there is a selected item, ...
3 years, 10 months ago (2017-02-01 03:20:31 UTC) #21
constantina
Done. On 2017/02/01 03:20:31, sky wrote: > That's confusing. The accept key should only be ...
3 years, 10 months ago (2017-02-01 06:28:28 UTC) #22
Matt Giuca
https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/ui/browser_dialogs.h File chrome/browser/ui/browser_dialogs.h (right): https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/ui/browser_dialogs.h#newcode164 chrome/browser/ui/browser_dialogs.h:164: // |callback| with the manifest URL of the chosen ...
3 years, 10 months ago (2017-02-01 07:04:33 UTC) #25
Matt Giuca
https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/webshare/share_service_impl.cc File chrome/browser/webshare/share_service_impl.cc (right): https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/webshare/share_service_impl.cc#newcode171 chrome/browser/webshare/share_service_impl.cc:171: std::string url_base = base::UTF16ToASCII(result.value()); UTF16ToUTF8 Otherwise this will fail ...
3 years, 10 months ago (2017-02-01 07:17:23 UTC) #26
Matt Giuca
https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/webshare/share_service_impl.cc File chrome/browser/webshare/share_service_impl.cc (right): https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/webshare/share_service_impl.cc#newcode143 chrome/browser/webshare/share_service_impl.cc:143: std::vector<base::string16> targets{base::ASCIIToUTF16(kUrlBase)}; On 2017/02/01 07:04:33, Matt Giuca wrote: > ...
3 years, 10 months ago (2017-02-01 07:25:23 UTC) #29
constantina
https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/ui/browser_dialogs.h File chrome/browser/ui/browser_dialogs.h (right): https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/ui/browser_dialogs.h#newcode164 chrome/browser/ui/browser_dialogs.h:164: // |callback| with the manifest URL of the chosen ...
3 years, 10 months ago (2017-02-01 23:24:21 UTC) #30
Matt Giuca
LGTM with a couple of nits. https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc File chrome/browser/ui/views/webshare/webshare_target_picker_view.cc (right): https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc#newcode100 chrome/browser/ui/views/webshare/webshare_target_picker_view.cc:100: if (button == ...
3 years, 10 months ago (2017-02-02 00:07:40 UTC) #31
constantina
https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc File chrome/browser/ui/views/webshare/webshare_target_picker_view.cc (right): https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc#newcode100 chrome/browser/ui/views/webshare/webshare_target_picker_view.cc:100: if (button == ui::DIALOG_BUTTON_OK) On 2017/02/02 00:07:40, Matt Giuca ...
3 years, 10 months ago (2017-02-02 00:54:17 UTC) #32
Matt Giuca
On 2017/02/02 00:54:17, constantina wrote: > https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc > File chrome/browser/ui/views/webshare/webshare_target_picker_view.cc (right): > > https://codereview.chromium.org/2667803002/diff/220001/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc#newcode100 > ...
3 years, 10 months ago (2017-02-02 23:56:50 UTC) #33
constantina
Changed some parameter types. See updated description for details, and in-code documentation.
3 years, 10 months ago (2017-02-03 01:14:55 UTC) #36
Matt Giuca
slgtm with a few extra nits. https://codereview.chromium.org/2667803002/diff/320001/chrome/browser/ui/browser_dialogs.h File chrome/browser/ui/browser_dialogs.h (right): https://codereview.chromium.org/2667803002/diff/320001/chrome/browser/ui/browser_dialogs.h#newcode163 chrome/browser/ui/browser_dialogs.h:163: // title and ...
3 years, 10 months ago (2017-02-03 01:44:45 UTC) #37
Matt Giuca
Good: with the change to pass a vector of pairs into the UI, we are ...
3 years, 10 months ago (2017-02-03 01:45:22 UTC) #38
constantina
https://codereview.chromium.org/2667803002/diff/320001/chrome/browser/ui/browser_dialogs.h File chrome/browser/ui/browser_dialogs.h (right): https://codereview.chromium.org/2667803002/diff/320001/chrome/browser/ui/browser_dialogs.h#newcode163 chrome/browser/ui/browser_dialogs.h:163: // title and manifest URL pairss that will be ...
3 years, 10 months ago (2017-02-03 04:32:40 UTC) #39
sky
https://codereview.chromium.org/2667803002/diff/360001/chrome/browser/ui/browser_dialogs.h File chrome/browser/ui/browser_dialogs.h (right): https://codereview.chromium.org/2667803002/diff/360001/chrome/browser/ui/browser_dialogs.h#newcode165 chrome/browser/ui/browser_dialogs.h:165: // or returns null if the user cancelled the ...
3 years, 10 months ago (2017-02-03 18:48:42 UTC) #40
sky
Also, please add tests of the view class.
3 years, 10 months ago (2017-02-03 23:34:28 UTC) #41
constantina
Matt is doing the tests in this other CL: https://codereview.chromium.org/2679533002 https://codereview.chromium.org/2667803002/diff/360001/chrome/browser/ui/browser_dialogs.h File chrome/browser/ui/browser_dialogs.h (right): https://codereview.chromium.org/2667803002/diff/360001/chrome/browser/ui/browser_dialogs.h#newcode165 ...
3 years, 10 months ago (2017-02-06 03:02:35 UTC) #42
sky
LGTM
3 years, 10 months ago (2017-02-06 17:08:39 UTC) #43
sky
On 2017/02/06 17:08:39, sky wrote: > LGTM Please include test coverage of selection as well.
3 years, 10 months ago (2017-02-06 17:21:23 UTC) #44
Matt Giuca
Hi Scott, My plan yesterday was to have Connie rebase this CL onto my tests, ...
3 years, 10 months ago (2017-02-07 00:10:41 UTC) #45
sky
Land away. On Mon, Feb 6, 2017 at 4:10 PM, <mgiuca@chromium.org> wrote: > Hi Scott, ...
3 years, 10 months ago (2017-02-07 00:28:29 UTC) #46
Matt Giuca
On 2017/02/07 00:28:29, sky wrote: > Land away. Cheers! > > On Mon, Feb 6, ...
3 years, 10 months ago (2017-02-07 00:30:21 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2667803002/380001
3 years, 10 months ago (2017-02-07 00:46:34 UTC) #50
commit-bot: I haz the power
3 years, 10 months ago (2017-02-07 02:15:17 UTC) #53
Message was sent while issue was closed.
Committed patchset #20 (id:380001) as
https://chromium.googlesource.com/chromium/src/+/e4c513e7ae3fd3a6c7752f8add47...

Powered by Google App Engine
This is Rietveld 408576698