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

Unified Diff: ios/clean/chrome/browser/ui/overlays/overlay_scheduler.h

Issue 2921833002: [iOS Clean] Created OverlayService.
Patch Set: Cancel overlays on queue deallocation 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/overlay_scheduler.h
diff --git a/ios/clean/chrome/browser/ui/overlays/overlay_scheduler.h b/ios/clean/chrome/browser/ui/overlays/overlay_scheduler.h
new file mode 100644
index 0000000000000000000000000000000000000000..793ea8f0c559c86cc3c336f79175ffa07e533135
--- /dev/null
+++ b/ios/clean/chrome/browser/ui/overlays/overlay_scheduler.h
@@ -0,0 +1,29 @@
+// 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_OVERLAY_SCHEDULER_H_
+#define IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_OVERLAY_SCHEDULER_H_
+
+#include <Foundation/Foundation.h>
+
+#import "ios/clean/chrome/browser/ui/commands/overlay_commands.h"
+
+@protocol TabGridCommands;
+class WebStateList;
+
+// An object that manages displaying a WebState's content view before starting
marq (ping after 24h) 2017/06/14 10:02:32 Document clearly how this class may trigger websta
kkhorimoto 2017/06/15 08:26:28 Done.
+// an overlay from its OverlayQueue.
+@interface OverlayScheduler : NSObject<OverlaySchedulerCommands>
marq (ping after 24h) 2017/06/14 10:02:32 Unit tests for this class?
kkhorimoto 2017/06/15 08:26:28 Ack. Will be in next patch.
+
+// Designated initializer for a OverlayScheduler that uses |dispatcher| to
+// switch the foreground tab and present overlays.
+- (instancetype)initWithWebStateList:(WebStateList*)webStateList
+ dispatcher:
+ (id<TabGridCommands, OverlayPresentationCommands>)
+ dispatcher NS_DESIGNATED_INITIALIZER;
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+#endif // IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_OVERLAY_SCHEDULER_H_

Powered by Google App Engine
This is Rietveld 408576698