Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: ios/web/public/web_state/ui/crw_native_content_provider.h

Issue 2655463014: Pass the correct webState to the nativeContent. (Closed)
Patch Set: s/ithW// Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 webState:(web::WebState*)webState;
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_
OLDNEW
« no previous file with comments | « ios/web/public/test/fakes/test_native_content_provider.mm ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698