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

Unified Diff: ios/public/provider/web/web_ui_ios_controller_factory.h

Issue 1110213002: Upstream most of the iOS WebUI support in ios/web/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/public/provider/web/web_ui_ios_controller_factory.h
diff --git a/ios/public/provider/web/web_ui_ios_controller_factory.h b/ios/public/provider/web/web_ui_ios_controller_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..1be15fa33a384c2685ea9440e435a4ae4b73016b
--- /dev/null
+++ b/ios/public/provider/web/web_ui_ios_controller_factory.h
@@ -0,0 +1,34 @@
+// Copyright 2014 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_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_FACTORY_H_
+#define IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_FACTORY_H_
+
+#include "ios/public/provider/web/web_ui_ios.h"
+
+class GURL;
+
+namespace web {
+
+class WebUIIOSController;
+
+// Interface for an object that controls which URLs are considered WebUIIOS
+// URLs and creates WebUIIOSController instances for given URLs.
+class WebUIIOSControllerFactory {
+ public:
+ virtual ~WebUIIOSControllerFactory() {}
+
+ // Call to register a factory.
+ static void RegisterFactory(WebUIIOSControllerFactory* factory);
+
+ // Returns a WebUIIOSController instance for the given URL, or NULL if the URL
+ // doesn't correspond to a WebUIIOS.
+ virtual WebUIIOSController* CreateWebUIIOSControllerForURL(
+ WebUIIOS* web_ui,
+ const GURL& url) const = 0;
+};
+
+} // namespace web
+
+#endif // IOS_PUBLIC_PROVIDER_WEB_WEB_UI_IOS_CONTROLLER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698