| Index: ios/clean/chrome/browser/ui/overlay_service/internal/web_state_overlay_queue.h
|
| diff --git a/ios/clean/chrome/browser/ui/overlay_service/internal/web_state_overlay_queue.h b/ios/clean/chrome/browser/ui/overlay_service/internal/web_state_overlay_queue.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..45b26429ba684c7255c0027254d52a8ac7b3b67f
|
| --- /dev/null
|
| +++ b/ios/clean/chrome/browser/ui/overlay_service/internal/web_state_overlay_queue.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_INTERNAL_WEB_STATE_OVERLAY_QUEUE_H_
|
| +#define IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_INTERNAL_WEB_STATE_OVERLAY_QUEUE_H_
|
| +
|
| +#import "ios/clean/chrome/browser/ui/overlay_service/internal/overlay_queue.h"
|
| +#import "ios/web/public/web_state/web_state_user_data.h"
|
| +
|
| +// An implementation of OverlayQueue that stores BrowserCoordinators for a
|
| +// specific WebState.
|
| +class WebStateOverlayQueue
|
| + : public OverlayQueue,
|
| + public web::WebStateUserData<WebStateOverlayQueue> {
|
| + public:
|
| + // OverlayQueue:
|
| + web::WebState* GetWebState() const override;
|
| + void StartNextOverlay() override;
|
| +
|
| + // Adds an overlay coordinator that will be displayed over GetWebState()'s
|
| + // content area.
|
| + void AddWebStateOverlay(BrowserCoordinator* overlay_coordinator);
|
| + // Sets the parent coordinator to use for queued BrowserCoordinators.
|
| + // |parent| is expected to be displaying GetWebState()'s content area before
|
| + // calling this function.
|
| + void SetWebStateParentCoordinator(BrowserCoordinator* parent_coordinator);
|
| +
|
| + private:
|
| + friend class web::WebStateUserData<WebStateOverlayQueue>;
|
| + // The WebState with which this presenter is associated.
|
| + web::WebState* web_state_;
|
| + // The parent coordinator to use for overlays.
|
| + __weak BrowserCoordinator* parent_coordinator_;
|
| +
|
| + // Private constructor.
|
| + explicit WebStateOverlayQueue(web::WebState* web_state);
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(WebStateOverlayQueue);
|
| +};
|
| +
|
| +#endif // IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_INTERNAL_WEB_STATE_OVERLAY_QUEUE_H_
|
|
|