Index: ios/clean/chrome/browser/ui/overlays/browser_coordinator+overlay_support.h |
diff --git a/ios/clean/chrome/browser/ui/overlays/browser_coordinator+overlay_support.h b/ios/clean/chrome/browser/ui/overlays/browser_coordinator+overlay_support.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2bf6a751c21a125635e37be2b58421c2d74858a2 |
--- /dev/null |
+++ b/ios/clean/chrome/browser/ui/overlays/browser_coordinator+overlay_support.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_WEB_OVERLAY_COORDINATOR_H_ |
+#define IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_WEB_OVERLAY_COORDINATOR_H_ |
+ |
+#import <Foundation/Foundation.h> |
+ |
+#import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator.h" |
+ |
+class OverlayQueue; |
+ |
+// Interface exposing functionality to support being displayed via |
+// OverlayService. |
+@interface BrowserCoordinator (OverlaySupport) |
+ |
+// Whether this BrowserCoordinator supports overlaying. If NO, it cannot be |
+// presented via OverlayService. If YES, this coordinator is expected to call |
+// |-overlayWasStopped| from its |-stop| to allow the next queued overlay to |
+// be started. |
+// Defaults to NO. |
+@property(nonatomic, readonly) BOOL supportsOverlaying; |
kkhorimoto
2017/06/23 06:11:15
Not sure if this is the best solution. Originally
|
+ |
+// The queue used to present this overlay. |
+@property(nonatomic, assign) OverlayQueue* queue; |
+ |
+// Starts overlaying this coordinator over |overlayParent|. |
+- (void)startOverlayingCoordinator:(BrowserCoordinator*)overlayParent; |
+ |
+// Called when the overay is stopped so that the OverlayService can be notified. |
marq (ping after 24h)
2017/06/21 09:41:53
Spelling: overlay.
kkhorimoto
2017/06/23 06:11:15
Done.
|
+- (void)overlayWasStopped; |
+ |
+// Performs cleanup tasks for the overlay. This allows for deterministic |
+// cleanup to occur for coordinators whose UI has not been started. Rather than |
+// relying on |-dealloc| to perform cleanup, |-cancelOverlay| can be used to |
+// perform cleanup tasks deterministically. |
+- (void)cancelOverlay; |
+ |
+@end |
+ |
+#endif // IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_WEB_OVERLAY_COORDINATOR_H_ |