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

Side by Side Diff: ios/clean/chrome/browser/ui/overlay_service/browser_coordinator+overlay_support.h

Issue 2921833002: [iOS Clean] Created OverlayService.
Patch Set: rebase & Mark's comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_WEB_OVERLAY_COORDINATOR_H_
6 #define IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_WEB_OVERLAY_COORDINATOR_H_
7
8 #import <Foundation/Foundation.h>
9
10 #import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator.h"
11
12 class OverlayQueue;
13 class OverlayService;
14
15 // Interface exposing functionality to support being displayed via
16 // OverlayService.
17 @interface BrowserCoordinator (OverlaySupport)
18
19 // Returns the OverlayService associated with the receiver's BrowserState.
20 @property(nonatomic, readonly) OverlayService* overlayService;
21
22 // Whether this BrowserCoordinator supports overlaying. Defaults to NO. If NO,
23 // it cannot be presented via OverlayService. If YES, the coordinator is
24 // expected to:
25 // - call |-overlayWasStopped| from its |-stop| so that the OverlayService can
marq (ping after 24h) 2017/06/23 10:42:01 It seems like these things could be guaranteed in
26 // show the next overlay,
27 // - implement the |overlayQueue| property.
28 @property(nonatomic, readonly) BOOL supportsOverlaying;
29
30 // The queue used to present this overlay.
31 @property(nonatomic, assign) OverlayQueue* overlayQueue;
32
33 // Starts overlaying this coordinator over |overlayParent|. The receiver will
34 // be added as a child of |overlayParent|.
35 - (void)startOverlayingCoordinator:(BrowserCoordinator*)overlayParent;
36
37 // Called when the overlay is stopped so that the OverlayService can be
38 // notified. This function also removes the receiver as a child from its parent
39 // coordinator.
40 - (void)overlayWasStopped;
marq (ping after 24h) 2017/06/23 10:42:01 yeah, I'd rather have an OverlayCoordinator class
41
42 // Performs cleanup tasks for the overlay. This allows for deterministic
43 // cleanup to occur for coordinators whose UI has not been started. Rather than
44 // relying on |-dealloc| to perform cleanup, |-cancelOverlay| can be used to
45 // perform cleanup tasks deterministically.
46 - (void)cancelOverlay;
47
48 @end
49
50 #endif // IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_WEB_OVERLAY_COORDINATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698