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_WEB_CONTENTS_OVERLAYS_WEB_OVERLAY_COORDINATO R_H_ | |
6 #define IOS_CLEAN_CHROME_BROWSER_UI_WEB_CONTENTS_OVERLAYS_WEB_OVERLAY_COORDINATO R_H_ | |
7 | |
8 #import <Foundation/Foundation.h> | |
9 | |
10 #import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator.h" | |
11 | |
12 namespace web { | |
13 class WebState; | |
14 } | |
15 | |
16 // An overlay coordinator requested by a WKWebView. These coordinators own the | |
marq (ping after 24h)
2017/06/02 16:14:11
Nit: WKWebView is an implementation detail inside
kkhorimoto
2017/06/03 00:37:32
I've generalized this and other WebOverlay classes
| |
17 // completion handlers supplied by WebKit and are responsible for cancelling | |
18 // them if necessary. This interface is meant to be subclassed for JavaScript | |
19 // dialogs, HTTP authentication dialogs, etc. | |
20 @interface WebOverlayCoordinator : BrowserCoordinator | |
21 | |
22 // Designated initializer. |webState| is the WebState whose WKWebView is | |
23 // requesting the overlay. | |
24 - (instancetype)initWithWebState:(web::WebState*)webState | |
25 NS_DESIGNATED_INITIALIZER; | |
26 - (instancetype)init NS_UNAVAILABLE; | |
27 | |
28 // Starts this WebOverlayCoordinator over |web_coordinator|. |web_coordinator| | |
29 // is expected to be displaying the WKWebView that requested the overlay. | |
30 - (void)startOverlayingWebCoordinator:(BrowserCoordinator*)webCoordinator; | |
marq (ping after 24h)
2017/06/02 16:14:11
Wouldn't this just be this coordinator's parent?
kkhorimoto
2017/06/03 00:37:32
When this is called, there is no parent yet. All
| |
31 | |
32 // Executes its WebKit completion handler with null parameters. WebKit | |
33 // completion handlers throw exceptions if they are deallocated without | |
34 // being executed. | |
35 - (void)cancelWebKitCompletion; | |
marq (ping after 24h)
2017/06/02 16:14:11
This very much feels like it shouldn't be part of
kkhorimoto
2017/06/03 00:37:32
I've generalized this so that it no longer refers
| |
36 | |
37 @end | |
38 | |
39 #endif // IOS_CLEAN_CHROME_BROWSER_UI_WEB_CONTENTS_OVERLAYS_WEB_OVERLAY_COORDIN ATOR_H_ | |
OLD | NEW |