Refactor the NTP to make the use of Content Suggestions as NTP easier. The GoogleLandingViewController is more than 1500 lines of code. The first step is to move as many functions as possible to helpers.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/808626a965952b3b50656b1fc57f995964506ec3 commit 808626a965952b3b50656b1fc57f995964506ec3 Author: gambard <gambard@chromium.org> Date: Thu May 04 15:28:03 2017 Change the constraint to anchor constraints in GoogleLandingController The anchor constraints syntax is clearer than the old NSLayoutConstraint syntax. BUG= 717974 Review-Url: https://codereview.chromium.org/2860713002 Cr-Commit-Position: refs/heads/master@{#469343} [modify] https://crrev.com/808626a965952b3b50656b1fc57f995964506ec3/ios/chrome/browser/ui/ntp/google_landing_view_controller.mm
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6fc6c3d5071745fe9d37f94a772b1e70231f96ee commit 6fc6c3d5071745fe9d37f94a772b1e70231f96ee Author: gambard <gambard@chromium.org> Date: Tue May 09 11:58:48 2017 Split the NTP in two targets to use it in ContentSuggestions The ntp_internal is using some components of ContentSuggestions. In order to add the header view in Content Suggestions, the files have to be moved to a different target. BUG= 717974 Review-Url: https://codereview.chromium.org/2854393005 Cr-Commit-Position: refs/heads/master@{#470287} [modify] https://crrev.com/6fc6c3d5071745fe9d37f94a772b1e70231f96ee/ios/chrome/browser/ui/ntp/BUILD.gn
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2c54e2be976f7c4e8d8ac2438f5f1e97f6566a6c commit 2c54e2be976f7c4e8d8ac2438f5f1e97f6566a6c Author: gambard <gambard@chromium.org> Date: Wed May 10 13:13:44 2017 Move frame-related methods out of GoogleLandingViewController In order to be able to display the ContentSuggestions as NTP, some methods should be moved in helpers. This CL moves the methods related to the frame of the elements in the NTP. BUG= 700375 , 717974 Review-Url: https://codereview.chromium.org/2857123003 Cr-Commit-Position: refs/heads/master@{#470549} [modify] https://crrev.com/2c54e2be976f7c4e8d8ac2438f5f1e97f6566a6c/ios/chrome/browser/ui/content_suggestions/BUILD.gn [add] https://crrev.com/2c54e2be976f7c4e8d8ac2438f5f1e97f6566a6c/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_utils.h [add] https://crrev.com/2c54e2be976f7c4e8d8ac2438f5f1e97f6566a6c/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_utils.mm [add] https://crrev.com/2c54e2be976f7c4e8d8ac2438f5f1e97f6566a6c/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_utils_unittest.mm [modify] https://crrev.com/2c54e2be976f7c4e8d8ac2438f5f1e97f6566a6c/ios/chrome/browser/ui/ntp/BUILD.gn [modify] https://crrev.com/2c54e2be976f7c4e8d8ac2438f5f1e97f6566a6c/ios/chrome/browser/ui/ntp/google_landing_view_controller.mm
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/02b01701047edf186f7d4164af8bcc6a0c78594f commit 02b01701047edf186f7d4164af8bcc6a0c78594f Author: gambard <gambard@chromium.org> Date: Wed May 10 15:41:53 2017 Move the fake omnibox constraints out of GoogleLandingViewController In order to refactor GoogleLandingViewController, the configuration of the elements displayed in the fake omnibox are moved to a helper. BUG= 717974 Review-Url: https://codereview.chromium.org/2855113003 Cr-Commit-Position: refs/heads/master@{#470583} [modify] https://crrev.com/02b01701047edf186f7d4164af8bcc6a0c78594f/ios/chrome/browser/ui/content_suggestions/BUILD.gn [modify] https://crrev.com/02b01701047edf186f7d4164af8bcc6a0c78594f/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_utils.h [modify] https://crrev.com/02b01701047edf186f7d4164af8bcc6a0c78594f/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_utils.mm [modify] https://crrev.com/02b01701047edf186f7d4164af8bcc6a0c78594f/ios/chrome/browser/ui/ntp/google_landing_view_controller.mm
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b684b8955e632634348cbbd2f829df3b727bc259 commit b684b8955e632634348cbbd2f829df3b727bc259 Author: gambard <gambard@chromium.org> Date: Wed Jun 21 13:06:31 2017 Remove IsOffTheRecord from GoogleLandingConsumer This CL removes the IsOffTheRecord property of the GoogleLandingVC as it can only be presented in OnTheRecord navigation. BUG= 717974 Change-Id: I8cb60f8c6e2747e61dc1915410749de8f9c1905f Reviewed-on: https://chromium-review.googlesource.com/536954 Commit-Queue: Gauthier Ambard <gambard@chromium.org> Reviewed-by: Justin Cohen <justincohen@chromium.org> Cr-Commit-Position: refs/heads/master@{#481186} [modify] https://crrev.com/b684b8955e632634348cbbd2f829df3b727bc259/ios/chrome/browser/ui/ntp/google_landing_consumer.h [modify] https://crrev.com/b684b8955e632634348cbbd2f829df3b727bc259/ios/chrome/browser/ui/ntp/google_landing_mediator.mm [modify] https://crrev.com/b684b8955e632634348cbbd2f829df3b727bc259/ios/chrome/browser/ui/ntp/google_landing_view_controller.mm
Comment 1 by bugdroid1@chromium.org
, May 4 2017