[ios clean] Add a header view for the NTP

Desktop / Chromium - gambard [chromium.org] - 10 August 2017 12:16 EDT

This CL adds the header view to the collection. The header is not using the dispatcher as most of the call needed are not yet implemented. Alerts are used to signal the place were the dispatcher should be called. The header has the constraints of the header used in the old chrome. In particular its height is calculated as if the toolbar is displayed inside the view. This will be addressed in a future CL.

Bug: 753391 Change-Id: Ibb26ca42d50c9ef833731e994fc50764dcebd340 Reviewed-on: https://chromium-review.googlesource.com/607872 Commit-Queue: Gauthier Ambard

0136b9e [ios clean] Add a header view for the NTP
ios/chrome/browser/content_suggestions/BUILD.gn | 2 -
.../content_suggestions_coordinator.mm | 2 +-
.../content_suggestions_header_view_controller.h | 2 +-
.../content_suggestions_header_view_controller.mm | 2 +-
.../content_suggestions_mediator.mm | 2 +-
ios/chrome/browser/ui/content_suggestions/BUILD.gn | 2 +
.../content_suggestions_header_provider.h | 6 +-
...t_suggestions_header_view_controller_delegate.h | 6 +-
.../browser/ui/ntp/new_tab_page_header_constants.h | 9 +
.../ui/ntp/new_tab_page_header_constants.mm | 3 +
.../browser/ui/ntp/new_tab_page_header_view.mm | 16 +-
ios/clean/chrome/browser/DEPS | 1 +
ios/clean/chrome/browser/ui/ntp/BUILD.gn | 16 +-
.../chrome/browser/ui/ntp/ntp_home_coordinator.mm | 68 ++---
.../browser/ui/ntp/ntp_home_header_coordinator.h | 47 ++++
.../browser/ui/ntp/ntp_home_header_coordinator.mm | 67 +++++
.../ui/ntp/ntp_home_header_coordinator_unittest.mm | 9 +
.../browser/ui/ntp/ntp_home_header_mediator.h | 42 +++
.../browser/ui/ntp/ntp_home_header_mediator.mm | 198 +++++++++++++
.../ui/ntp/ntp_home_header_mediator_unittest.mm | 9 +
.../ui/ntp/ntp_home_header_view_controller.h | 40 +--
.../ui/ntp/ntp_home_header_view_controller.mm | 309 +++++++++++++++++----
22 files changed, 718 insertions(+), 140 deletions(-)

Upstream: git.chromium.org


  • Share