OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // ====== New Architecture ===== | 5 // ====== New Architecture ===== |
6 // = This code is only used in the new iOS Chrome architecture. = | 6 // = This code is only used in the new iOS Chrome architecture. = |
7 // ============================================================================ | 7 // ============================================================================ |
8 | 8 |
9 #ifndef IOS_CHROME_BROWSER_WEB_WEB_MEDIATOR_H_ | 9 #ifndef IOS_CLEAN_CHROME_BROWSER_WEB_WEB_MEDIATOR_H_ |
10 #define IOS_CHROME_BROWSER_WEB_WEB_MEDIATOR_H_ | 10 #define IOS_CLEAN_CHROME_BROWSER_WEB_WEB_MEDIATOR_H_ |
11 | 11 |
12 #import <Foundation/Foundation.h> | 12 #import <Foundation/Foundation.h> |
13 | 13 |
14 namespace web { | 14 namespace web { |
15 class WebState; | 15 class WebState; |
16 } | 16 } |
17 | 17 |
18 // An object to provide extensible access to a webState. | 18 // An object to provide extensible access to a webState. |
19 // Feature implementations that add functionality to a webState by injecting | 19 // Feature implementations that add functionality to a webState by injecting |
20 // javascript should do so in categories on WebMediator that implement protocols | 20 // javascript should do so in categories on WebMediator that implement protocols |
21 // for use by components interfacing with the feature and by webState clients | 21 // for use by components interfacing with the feature and by webState clients |
22 // (for example, view controllers displaying webState's view). | 22 // (for example, view controllers displaying webState's view). |
23 // Category implementations should make use of web_mediator+internals.h to | 23 // Category implementations should make use of web_mediator+internals.h to |
24 // access internal APIs for this class. | 24 // access internal APIs for this class. |
25 @interface WebMediator : NSObject | 25 @interface WebMediator : NSObject |
26 | 26 |
27 - (instancetype)initWithWebState:(web::WebState*)webState | 27 - (instancetype)initWithWebState:(web::WebState*)webState |
28 NS_DESIGNATED_INITIALIZER; | 28 NS_DESIGNATED_INITIALIZER; |
29 | 29 |
30 - (instancetype)init NS_UNAVAILABLE; | 30 - (instancetype)init NS_UNAVAILABLE; |
31 | 31 |
32 @property(nonatomic, readonly) web::WebState* webState; | 32 @property(nonatomic, readonly) web::WebState* webState; |
33 | 33 |
34 @end | 34 @end |
35 | 35 |
36 #endif // IOS_CHROME_BROWSER_WEB_WEB_MEDIATOR_H_ | 36 #endif // IOS_CLEAN_CHROME_BROWSER_WEB_WEB_MEDIATOR_H_ |
OLD | NEW |