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

Unified Diff: ios/web/public/web_state/crw_native_content_provider.h

Issue 986743003: Upstream (most of) ios/web/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix namespace comment Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ios/web/public/web_state/crw_native_content_provider.h
diff --git a/ios/web/public/web_state/crw_native_content_provider.h b/ios/web/public/web_state/crw_native_content_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d4a4cc6e656c371ede3f7e2fb6f9c77cf99ab08
--- /dev/null
+++ b/ios/web/public/web_state/crw_native_content_provider.h
@@ -0,0 +1,34 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_WEB_PUBLIC_WEB_STATE_CRW_NATIVE_CONTENT_PROVIDER_H_
+#define IOS_WEB_PUBLIC_WEB_STATE_CRW_NATIVE_CONTENT_PROVIDER_H_
+#import <UIKit/UIKit.h>
+
+class GURL;
+
+@protocol CRWNativeContent;
+
+// Provide a controller to a native view representing a given URL.
+@protocol CRWNativeContentProvider
+
+// Returns whether the Provider has a controller for the given URL.
+- (BOOL)hasControllerForURL:(const GURL&)url;
+
+// Returns an autoreleased controller for driving a native view contained
+// within the web content area. This may return nil if the url is unsupported.
+// |url| will be of the form "chrome://foo".
+- (id<CRWNativeContent>)controllerForURL:(const GURL&)url;
+
+// Returns an autoreleased controller for driving a native view contained
+// within the web content area. The native view will contain an error page
+// with information appropriate for the problem described in |error|.
+// |isPost| indicates whether the error was for a post request.
+- (id<CRWNativeContent>)controllerForURL:(const GURL&)url
+ withError:(NSError*)error
+ isPost:(BOOL)isPost;
+
+@end
+
+#endif // IOS_WEB_PUBLIC_WEB_STATE_CRW_NATIVE_CONTENT_PROVIDER_H_
« no previous file with comments | « ios/web/public/web_state/crw_native_content.h ('k') | ios/web/public/web_state/crw_web_controller_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698