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

Issue 1570783003: [Autofill] Move functions from the AutofillPopupController to AutofillPopupLayoutModel (Closed)

Created:
4 years, 11 months ago by Mathieu
Modified:
4 years, 11 months ago
CC:
chromium-reviews, vabr+watchlistpasswordmanager_chromium.org, rouslan+autofill_chromium.org, tfarina, jdonnelly+autofillwatch_chromium.org, bondd+autofillwatch_chromium.org, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org, mkwst+watchlist-passwords_chromium.org, Roger Tawa OOO till Jul 10th
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Autofill] Move functions from the AutofillPopupController to AutofillPopupLayoutModel The controller should only provide the data model and tell the view when to redraw. This is functionality neutral, although quite a few tests are shuffled around. For Mac, a delegate interface is introduced so that the Cocoa view can call into the view layout model. BUG=575802 TEST=Existing Committed: https://crrev.com/c338bb771c11d46e814176a1958ec26943d4f5c6 Cr-Commit-Position: refs/heads/master@{#370697}

Patch Set 1 : rebase #

Patch Set 2 : android and mac #

Patch Set 3 : fixes #

Total comments: 6

Patch Set 4 : android compile fix #

Patch Set 5 : android fix #

Patch Set 6 : AutofillPopupViewHelper #

Total comments: 6

Patch Set 7 : remove scoped_ptr and rename mac delegate #

Total comments: 7

Patch Set 8 : addressed comments #

Patch Set 9 : mac fix #

Patch Set 10 : controller now owns the helper #

Total comments: 10

Patch Set 11 : layout model #

Total comments: 2

Patch Set 12 : size_t -> int #

Total comments: 5

Patch Set 13 : addressed nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+862 lines, -707 lines) Patch
M chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +11 lines, -11 lines 0 comments Download
M chrome/browser/ui/android/autofill/autofill_popup_view_android.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_popup_controller.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_popup_controller_impl.h View 1 2 3 4 5 6 7 8 9 10 6 chunks +20 lines, -33 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_popup_controller_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 chunks +69 lines, -183 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc View 9 chunks +6 lines, -58 lines 0 comments Download
A chrome/browser/ui/autofill/autofill_popup_layout_model.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +94 lines, -0 lines 0 comments Download
A chrome/browser/ui/autofill/autofill_popup_layout_model.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +180 lines, -0 lines 0 comments Download
A chrome/browser/ui/autofill/autofill_popup_layout_model_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +107 lines, -0 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_popup_view.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -25 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_popup_view_delegate.h View 1 4 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/ui/autofill/password_generation_popup_controller_impl.h View 1 2 3 4 5 6 7 4 chunks +12 lines, -1 line 0 comments Download
M chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc View 1 2 3 4 5 6 7 8 9 4 chunks +23 lines, -4 lines 0 comments Download
M chrome/browser/ui/autofill/popup_controller_common.h View 4 chunks +0 lines, -30 lines 0 comments Download
M chrome/browser/ui/autofill/popup_controller_common.cc View 2 chunks +0 lines, -124 lines 0 comments Download
D chrome/browser/ui/autofill/popup_controller_common_unittest.cc View 1 chunk +0 lines, -94 lines 0 comments Download
A chrome/browser/ui/autofill/popup_view_common.h View 1 2 3 4 5 6 7 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/browser/ui/autofill/popup_view_common.cc View 1 2 3 4 5 6 7 1 chunk +135 lines, -0 lines 0 comments Download
A + chrome/browser/ui/autofill/popup_view_common_unittest.cc View 1 2 3 4 5 6 7 1 chunk +41 lines, -27 lines 0 comments Download
D chrome/browser/ui/autofill/test_popup_controller_common.h View 1 chunk +0 lines, -35 lines 0 comments Download
D chrome/browser/ui/autofill/test_popup_controller_common.cc View 1 chunk +0 lines, -21 lines 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm View 1 2 3 4 5 6 7 5 chunks +13 lines, -12 lines 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +17 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm View 1 2 3 4 5 6 7 8 9 10 3 chunks +13 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h View 1 2 3 4 5 6 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 8 chunks +15 lines, -12 lines 0 comments Download
M chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa_unittest.mm View 1 2 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/autofill/autofill_popup_base_view_browsertest.cc View 1 5 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/autofill/autofill_popup_view_views.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/autofill/autofill_popup_view_views.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +12 lines, -7 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 65 (31 generated)
Mathieu
Hi Evan, PTAL. I think it's a good step in the right direction. I've tested ...
4 years, 11 months ago (2016-01-08 21:30:13 UTC) #11
Evan Stade
https://codereview.chromium.org/1570783003/diff/210001/chrome/browser/ui/autofill/autofill_popup_controller_impl.h File chrome/browser/ui/autofill/autofill_popup_controller_impl.h (right): https://codereview.chromium.org/1570783003/diff/210001/chrome/browser/ui/autofill/autofill_popup_controller_impl.h#newcode80 chrome/browser/ui/autofill/autofill_popup_controller_impl.h:80: ? https://codereview.chromium.org/1570783003/diff/210001/chrome/browser/ui/autofill/autofill_popup_controller_impl.h#newcode86 chrome/browser/ui/autofill/autofill_popup_controller_impl.h:86: #if !defined(OS_ANDROID) this will need to ...
4 years, 11 months ago (2016-01-09 00:19:02 UTC) #13
Mathieu
Thanks https://codereview.chromium.org/1570783003/diff/210001/chrome/browser/ui/autofill/autofill_popup_view.h File chrome/browser/ui/autofill/autofill_popup_view.h (right): https://codereview.chromium.org/1570783003/diff/210001/chrome/browser/ui/autofill/autofill_popup_view.h#newcode66 chrome/browser/ui/autofill/autofill_popup_view.h:66: int GetDesiredPopupHeight() const; On 2016/01/09 00:19:02, Evan Stade ...
4 years, 11 months ago (2016-01-09 00:53:17 UTC) #14
Evan Stade
On 2016/01/09 00:53:17, Mathieu Perreault wrote: > Thanks > > https://codereview.chromium.org/1570783003/diff/210001/chrome/browser/ui/autofill/autofill_popup_view.h > File chrome/browser/ui/autofill/autofill_popup_view.h (right): ...
4 years, 11 months ago (2016-01-09 01:01:58 UTC) #15
Mathieu
On 2016/01/09 01:01:58, Evan Stade wrote: > On 2016/01/09 00:53:17, Mathieu Perreault wrote: > > ...
4 years, 11 months ago (2016-01-09 01:14:40 UTC) #16
Mathieu
On 2016/01/09 01:14:40, Mathieu Perreault wrote: > On 2016/01/09 01:01:58, Evan Stade wrote: > > ...
4 years, 11 months ago (2016-01-09 01:36:51 UTC) #17
Mathieu
On 2016/01/09 01:36:51, Mathieu Perreault wrote: > On 2016/01/09 01:14:40, Mathieu Perreault wrote: > > ...
4 years, 11 months ago (2016-01-09 15:34:35 UTC) #18
Mathieu
Discussed with colleagues and removed the multiple inheritance. AutofillPopupView is back to being a pure ...
4 years, 11 months ago (2016-01-11 16:36:15 UTC) #19
Mathieu
https://codereview.chromium.org/1570783003/diff/210001/chrome/browser/ui/autofill/autofill_popup_controller_impl.h File chrome/browser/ui/autofill/autofill_popup_controller_impl.h (right): https://codereview.chromium.org/1570783003/diff/210001/chrome/browser/ui/autofill/autofill_popup_controller_impl.h#newcode80 chrome/browser/ui/autofill/autofill_popup_controller_impl.h:80: On 2016/01/09 00:19:02, Evan Stade wrote: > ? Done. ...
4 years, 11 months ago (2016-01-11 18:33:11 UTC) #23
Mathieu
+tedchoc@ for android +isherman@ for ui/cocoa/autofill and general opinion
4 years, 11 months ago (2016-01-11 20:46:34 UTC) #27
Ilya Sherman
This seems ok to me in spirit, though I think the actual class names and ...
4 years, 11 months ago (2016-01-11 21:06:45 UTC) #29
Evan Stade
On 2016/01/09 01:14:40, Mathieu Perreault wrote: > view implementation is still very platform specific (rAc's ...
4 years, 11 months ago (2016-01-11 23:09:38 UTC) #30
Evan Stade
thanks for looking into the menu idea. Indeed with the UI updates scheduled for the ...
4 years, 11 months ago (2016-01-13 04:30:27 UTC) #31
Mathieu
Thanks, PTAL https://codereview.chromium.org/1570783003/diff/350001/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h File chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h (right): https://codereview.chromium.org/1570783003/diff/350001/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h#newcode42 chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h:42: public AutofillPopupViewBridgeDelegate { On 2016/01/11 21:06:45, Ilya ...
4 years, 11 months ago (2016-01-13 17:04:27 UTC) #32
Evan Stade
https://codereview.chromium.org/1570783003/diff/370001/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc File chrome/browser/ui/autofill/autofill_popup_controller_impl.cc (right): https://codereview.chromium.org/1570783003/diff/370001/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc#newcode275 chrome/browser/ui/autofill/autofill_popup_controller_impl.cc:275: SetSelectedLine(view_->LineFromY(point.y())); > I would move towards enforcing that AutofillPopupView ...
4 years, 11 months ago (2016-01-13 18:18:57 UTC) #33
Mathieu
On 2016/01/13 18:18:57, Evan Stade wrote: > https://codereview.chromium.org/1570783003/diff/370001/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc > File chrome/browser/ui/autofill/autofill_popup_controller_impl.cc (right): > > https://codereview.chromium.org/1570783003/diff/370001/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc#newcode275 ...
4 years, 11 months ago (2016-01-13 19:26:38 UTC) #34
Mathieu
On 2016/01/13 19:26:38, Mathieu Perreault wrote: > On 2016/01/13 18:18:57, Evan Stade wrote: > > ...
4 years, 11 months ago (2016-01-13 19:28:04 UTC) #35
Evan Stade
I said "If you can fix all the thunks this way, groovy." but you showed ...
4 years, 11 months ago (2016-01-14 03:01:58 UTC) #36
Mathieu
On 2016/01/14 03:01:58, Evan Stade (ooo till Tue 1.19) wrote: > I said "If you ...
4 years, 11 months ago (2016-01-14 23:09:35 UTC) #41
Evan Stade
much nicer! https://codereview.chromium.org/1570783003/diff/490001/chrome/browser/ui/autofill/autofill_popup_controller.h File chrome/browser/ui/autofill/autofill_popup_controller.h (right): https://codereview.chromium.org/1570783003/diff/490001/chrome/browser/ui/autofill/autofill_popup_controller.h#newcode69 chrome/browser/ui/autofill/autofill_popup_controller.h:69: virtual AutofillPopupViewHelper* view_helper() = 0; can this ...
4 years, 11 months ago (2016-01-20 04:51:17 UTC) #42
Mathieu
Thanks, PTAL https://codereview.chromium.org/1570783003/diff/490001/chrome/browser/ui/autofill/autofill_popup_controller.h File chrome/browser/ui/autofill/autofill_popup_controller.h (right): https://codereview.chromium.org/1570783003/diff/490001/chrome/browser/ui/autofill/autofill_popup_controller.h#newcode69 chrome/browser/ui/autofill/autofill_popup_controller.h:69: virtual AutofillPopupViewHelper* view_helper() = 0; On 2016/01/20 ...
4 years, 11 months ago (2016-01-20 17:57:44 UTC) #45
Evan Stade
lgtm! you'll need more owners (for cocoa at least) https://codereview.chromium.org/1570783003/diff/550001/chrome/browser/ui/autofill/autofill_popup_layout_model.h File chrome/browser/ui/autofill/autofill_popup_layout_model.h (right): https://codereview.chromium.org/1570783003/diff/550001/chrome/browser/ui/autofill/autofill_popup_layout_model.h#newcode35 chrome/browser/ui/autofill/autofill_popup_layout_model.h:35: ...
4 years, 11 months ago (2016-01-20 19:15:49 UTC) #46
Mathieu
Thanks! Ilya: please review cocoa/ Ted: android please https://codereview.chromium.org/1570783003/diff/550001/chrome/browser/ui/autofill/autofill_popup_layout_model.h File chrome/browser/ui/autofill/autofill_popup_layout_model.h (right): https://codereview.chromium.org/1570783003/diff/550001/chrome/browser/ui/autofill/autofill_popup_layout_model.h#newcode35 chrome/browser/ui/autofill/autofill_popup_layout_model.h:35: static ...
4 years, 11 months ago (2016-01-20 19:27:05 UTC) #47
Ilya Sherman
https://codereview.chromium.org/1570783003/diff/570001/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h File chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h (right): https://codereview.chromium.org/1570783003/diff/570001/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h#newcode18 chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h:18: autofill::AutofillPopupViewDelegate* popup_delegate_; // weak Why did you change this ...
4 years, 11 months ago (2016-01-20 23:25:18 UTC) #48
Ilya Sherman
By the way, please update the CL description to match its current state =)
4 years, 11 months ago (2016-01-20 23:26:12 UTC) #49
Mathieu
Thanks Ilya! https://codereview.chromium.org/1570783003/diff/570001/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h File chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h (right): https://codereview.chromium.org/1570783003/diff/570001/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h#newcode18 chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h:18: autofill::AutofillPopupViewDelegate* popup_delegate_; // weak On 2016/01/20 23:25:18, ...
4 years, 11 months ago (2016-01-21 01:25:08 UTC) #51
Ilya Sherman
https://codereview.chromium.org/1570783003/diff/570001/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h File chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h (right): https://codereview.chromium.org/1570783003/diff/570001/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h#newcode18 chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h:18: autofill::AutofillPopupViewDelegate* popup_delegate_; // weak On 2016/01/21 01:25:08, Mathieu Perreault ...
4 years, 11 months ago (2016-01-21 01:27:03 UTC) #52
Mathieu
On 2016/01/21 01:27:03, Ilya Sherman wrote: > https://codereview.chromium.org/1570783003/diff/570001/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h > File chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h (right): > > https://codereview.chromium.org/1570783003/diff/570001/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h#newcode18 ...
4 years, 11 months ago (2016-01-21 01:30:24 UTC) #53
Ilya Sherman
On 2016/01/21 01:30:24, Mathieu Perreault wrote: > On 2016/01/21 01:27:03, Ilya Sherman wrote: > > ...
4 years, 11 months ago (2016-01-21 01:32:04 UTC) #54
Miguel Garcia
lgmt for chrome/browser/ui/*
4 years, 11 months ago (2016-01-21 13:59:57 UTC) #56
Miguel Garcia
lgtm
4 years, 11 months ago (2016-01-21 14:00:08 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1570783003/590001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1570783003/590001
4 years, 11 months ago (2016-01-21 14:16:05 UTC) #60
commit-bot: I haz the power
Committed patchset #13 (id:590001)
4 years, 11 months ago (2016-01-21 15:24:26 UTC) #63
commit-bot: I haz the power
4 years, 11 months ago (2016-01-21 15:26:14 UTC) #65
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/c338bb771c11d46e814176a1958ec26943d4f5c6
Cr-Commit-Position: refs/heads/master@{#370697}

Powered by Google App Engine
This is Rietveld 408576698