OLD | NEW |
---|---|
(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 namespace web { | |
13 class WebState; | |
14 } | |
15 | |
16 // OverlayCoordinators are queued on a per-WebState basis using OverlayQueue. | |
17 // OverlayScheduler manages switching the foreground tab so that the next | |
18 // WebState with a queued overlay is visible. | |
19 @interface OverlayCoordinator : BrowserCoordinator | |
20 | |
21 // Designated initializer. |webState| is used to for OverlaySchedulerCommands. | |
22 - (instancetype)initWithWebState:(web::WebState*)webState | |
23 NS_DESIGNATED_INITIALIZER; | |
24 - (instancetype)init NS_UNAVAILABLE; | |
25 | |
26 // The WebState presenting this overlay. | |
27 @property(nonatomic, readonly) web::WebState* webState; | |
28 | |
29 // Starts this overlay over |coordinator|'s UI. |coordinator| is expected to be | |
30 // displaying the content view of the overlay's corresponding WebState. | |
31 - (void)startOverlayingCoordinator:(BrowserCoordinator*)coordinator; | |
32 | |
33 // Performs cleanup tasks for the overlay. If a WebState is destroyed before its | |
34 // queued overlays are presented, the overlays are removed from the queue. | |
35 // Rather than relying on |-dealloc| to perform cleanup, |-cancelOverlay| can be | |
36 // used to perform cleanup tasks deterministically. | |
37 - (void)cancelOverlay; | |
marq (ping after 24h)
2017/06/14 10:02:32
How is this different from -stop?
kkhorimoto
2017/06/15 08:26:28
It's possible for these coordinators to be cancell
| |
38 | |
39 @end | |
40 | |
41 #endif // IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_WEB_OVERLAY_COORDINATOR_H_ | |
OLD | NEW |