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

Unified Diff: ios/clean/chrome/browser/ui/overlays/browser_coordinator+overlay_support.h

Issue 2921833002: [iOS Clean] Created OverlayService.
Patch Set: Use service pattern Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698