[iOS Clean] Created OverlayService

Desktop / Chromium - Kurt Horimoto [chromium.org] - 9 August 2017 14:06 EDT

This CL introduces OverlayService, a BrowerStateKeyedService that manages enqueueing overlay coordinators and scheduling the overlays to be displayed.

Classes of note:

- OverlayService: Interface to the overlay system. Concrete subclasses are vended by OverlayServiceFactory.
- OverlayQueue: FIFO queue of overlays that have been added to the service.- OverlayCoordinator: A BrowserCoordinator subclass that can be presented
via OverlayService. This class manages notifying OverlayQueues of coordinator lifecycle events.- BrowserOverlayQueue: OverlayQueue for overlays that need to be displayed over a particular Browser.- WebStateOverlayQueue: OverlayQueue for overlays that need to be displayed over a particular WebState's content area.- OverlayQueueManager: A BrowserUserData subclass that manages creating OverlayQueues for a Browser. It is a WebStateObserver and creates new WebStateOverlayQueues for each WebState that is added to the list.- OverlayScheduler: An OverlayQueueObserver that listens for events from the OverlayQueues managed by its OverlayQueueManager. This class is responsible for queueing OverlayQueues and switching the foreground tab to display the appropriate WebState for OverlayCordinators added to a WebStateOverlayQueue.

BUG: none Change-Id: I4cc6fca24888b499ce8bece8ca08f1ab0d251a1e Reviewed-on: https://chromium-review.googlesource.com/583945 Commit-Queue: Kurt Horimoto

d80e7a0 [iOS Clean] Created OverlayService.
ios/clean/chrome/browser/ui/overlays/BUILD.gn | 93 +++++++++++
ios/clean/chrome/browser/ui/overlays/DEPS | 4 +
.../browser/ui/overlays/browser_overlay_queue.h | 43 +++++
.../browser/ui/overlays/browser_overlay_queue.mm | 54 ++++++
.../ui/overlays/overlay_coordinator+internal.h | 26 +++
.../browser/ui/overlays/overlay_coordinator.h | 24 +++
.../browser/ui/overlays/overlay_coordinator.mm | 68 ++++++++
.../chrome/browser/ui/overlays/overlay_queue.h | 76 +++++++++
.../chrome/browser/ui/overlays/overlay_queue.mm | 105 ++++++++++++
.../browser/ui/overlays/overlay_queue_manager.h | 70 ++++++++
.../browser/ui/overlays/overlay_queue_manager.mm | 94 +++++++++++
.../ui/overlays/overlay_queue_manager_observer.h | 31 ++++
.../ui/overlays/overlay_queue_manager_unittest.mm | 95 +++++++++++
.../browser/ui/overlays/overlay_queue_observer.h | 35 ++++
.../browser/ui/overlays/overlay_queue_unittest.mm | 74 +++++++++
.../chrome/browser/ui/overlays/overlay_scheduler.h | 88 ++++++++++
.../browser/ui/overlays/overlay_scheduler.mm | 174 +++++++++++++++++++
.../ui/overlays/overlay_scheduler_observer.h | 31 ++++
.../ui/overlays/overlay_scheduler_unittest.mm | 185 +++++++++++++++++++++
.../chrome/browser/ui/overlays/overlay_service.h | 85 ++++++++++
.../browser/ui/overlays/overlay_service_factory.h | 44 +++++
.../browser/ui/overlays/overlay_service_factory.mm | 50 ++++++
.../browser/ui/overlays/overlay_service_impl.h | 67 ++++++++
.../browser/ui/overlays/overlay_service_impl.mm | 154 +++++++++++++++++
.../browser/ui/overlays/overlay_service_observer.h | 33 ++++
.../ui/overlays/overlay_service_observer_bridge.h | 44 +++++
.../ui/overlays/overlay_service_observer_bridge.mm | 24 +++
.../browser/ui/overlays/test_helpers/BUILD.gn | 35 ++++
.../test_helpers/test_overlay_coordinator.h | 18 ++
.../test_helpers/test_overlay_coordinator.mm | 34 ++++
.../test_helpers/test_overlay_parent_coordinator.h | 20 +++
.../test_overlay_parent_coordinator.mm | 40 +++++
.../ui/overlays/test_helpers/test_overlay_queue.h | 26 +++
.../ui/overlays/test_helpers/test_overlay_queue.mm | 25 +++
.../test_overlay_queue_manager_observer.h | 42 +++++
.../test_overlay_queue_manager_observer.mm | 33 ++++
.../test_helpers/test_overlay_queue_observer.h | 36 ++++
.../test_helpers/test_overlay_queue_observer.mm | 28 ++++
.../browser/ui/overlays/web_state_overlay_queue.h | 44 +++++
.../browser/ui/overlays/web_state_overlay_queue.mm | 42 +++++
ios/clean/chrome/browser/ui/tab_grid/BUILD.gn | 1 +
.../browser/ui/tab_grid/tab_grid_coordinator.mm | 45 ++++-
ios/clean/chrome/browser/ui/web_contents/BUILD.gn | 1 +
.../browser/ui/web_contents/web_coordinator.mm | 35 +++-
ios/clean/chrome/test/BUILD.gn | 1 +
45 files changed, 2374 insertions(+), 3 deletions(-)

Upstream: git.chromium.org


  • Share