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_STATE_OVERLAY_QUEUE_H_ | |
6 #define IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_WEB_STATE_OVERLAY_QUEUE_H_ | |
7 | |
8 #import "ios/clean/chrome/browser/ui/overlays/overlay_queue.h" | |
9 #import "ios/web/public/web_state/web_state_user_data.h" | |
10 | |
11 // An implementation of OverlayQueue that stores BrowserCoordinators for a | |
12 // specific WebState. | |
13 class WebStateOverlayQueue | |
14 : public OverlayQueue, | |
15 public web::WebStateUserData<WebStateOverlayQueue> { | |
16 public: | |
17 // OverlayQueue: | |
18 web::WebState* GetWebState() const override; | |
19 void StartNextOverlay() override; | |
20 | |
21 // Adds an overlay coordinator that will be displayed over GetWebState()'s | |
22 // content area. | |
23 void AddWebStateOverlay(BrowserCoordinator* overlay_coordinator); | |
24 // Sets the parent coordinator to use for queued BrowserCoordinators. | |
25 // |parent| is expected to be displaying GetWebState()'s content area before | |
26 // calling this function. | |
27 void SetWebStateParentCoordinator(BrowserCoordinator* parent_coordinator); | |
28 | |
29 private: | |
30 friend class web::WebStateUserData<WebStateOverlayQueue>; | |
31 // The WebState with which this presenter is associated. | |
32 web::WebState* web_state_; | |
33 // The parent coordinator to use for overlays. | |
34 BrowserCoordinator* parent_coordinator_; | |
marq (ping after 24h)
2017/06/21 09:41:54
_weak, I'm guessing; default would be strong.
kkhorimoto
2017/06/23 06:11:16
Done.
| |
35 | |
36 // Private constructor. | |
37 explicit WebStateOverlayQueue(web::WebState* web_state); | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(WebStateOverlayQueue); | |
40 }; | |
41 | |
42 #endif // IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_WEB_STATE_OVERLAY_QUEUE_H_ | |
OLD | NEW |