Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_NATIVE_CONTENT_PROVIDER_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_NATIVE_CONTENT_PROVIDER_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_NATIVE_CONTENT_PROVIDER_H_ | 6 #define IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_NATIVE_CONTENT_PROVIDER_H_ |
| 7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
| 8 | 8 |
| 9 class GURL; | 9 class GURL; |
| 10 | 10 |
| 11 @protocol CRWNativeContent; | 11 @protocol CRWNativeContent; |
| 12 | 12 |
| 13 namespace web { | |
| 14 class WebState; | |
| 15 } | |
| 16 | |
| 13 // Provide a controller to a native view representing a given URL. | 17 // Provide a controller to a native view representing a given URL. |
| 14 @protocol CRWNativeContentProvider | 18 @protocol CRWNativeContentProvider |
| 15 | 19 |
| 16 // Returns whether the Provider has a controller for the given URL. | 20 // Returns whether the Provider has a controller for the given URL. |
| 17 - (BOOL)hasControllerForURL:(const GURL&)url; | 21 - (BOOL)hasControllerForURL:(const GURL&)url; |
| 18 | 22 |
| 19 // Returns an autoreleased controller for driving a native view contained | 23 // Returns an autoreleased controller for driving a native view contained |
| 20 // within the web content area. This may return nil if the url is unsupported. | 24 // within the web content area. This may return nil if the url is unsupported. |
| 21 // |url| will be of the form "chrome://foo". | 25 // |url| will be of the form "chrome://foo". |
| 22 - (id<CRWNativeContent>)controllerForURL:(const GURL&)url; | 26 // |webState| is the webState that triggered the navigation to |url|. |
| 27 - (id<CRWNativeContent>)controllerForURL:(const GURL&)url | |
| 28 withWebState:(web::WebState*)webState; | |
|
Eugene But (OOO till 7-30)
2017/01/27 17:31:54
Should this be s/withWebState/webState? From inter
Olivier
2017/01/27 20:17:27
|controllerForURL:webState:| it is then.
Done.
| |
| 23 | 29 |
| 24 // Returns an autoreleased controller for driving a native view contained | 30 // Returns an autoreleased controller for driving a native view contained |
| 25 // within the web content area. The native view will contain an error page | 31 // within the web content area. The native view will contain an error page |
| 26 // with information appropriate for the problem described in |error|. | 32 // with information appropriate for the problem described in |error|. |
| 27 // |isPost| indicates whether the error was for a post request. | 33 // |isPost| indicates whether the error was for a post request. |
| 28 - (id<CRWNativeContent>)controllerForURL:(const GURL&)url | 34 - (id<CRWNativeContent>)controllerForURL:(const GURL&)url |
| 29 withError:(NSError*)error | 35 withError:(NSError*)error |
| 30 isPost:(BOOL)isPost; | 36 isPost:(BOOL)isPost; |
| 31 | 37 |
| 32 @end | 38 @end |
| 33 | 39 |
| 34 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_NATIVE_CONTENT_PROVIDER_H_ | 40 #endif // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_NATIVE_CONTENT_PROVIDER_H_ |
| OLD | NEW |