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

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

Issue 2527123003: [iOS] Upstream web_controller_provider_impl.{h,mm}. (Closed)
Patch Set: Fix downstream build. Created 4 years, 1 month 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_controller_provider_factory.h
diff --git a/ios/public/provider/web/web_controller_provider_factory.h b/ios/public/provider/web/web_controller_provider_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..67bf4dda0729129ff1016270ca565c0cb37f65cd
--- /dev/null
+++ b/ios/public/provider/web/web_controller_provider_factory.h
@@ -0,0 +1,38 @@
+// Copyright 2016 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_CONTROLLER_PROVIDER_FACTORY_H_
+#define IOS_PUBLIC_PROVIDER_WEB_WEB_CONTROLLER_PROVIDER_FACTORY_H_
+
+#include <memory>
+
+namespace web {
+class BrowserState;
+}
+
+namespace ios {
+
+class WebControllerProvider;
+
+// Factory for creation of WebControllerProvider instances.
+class WebControllerProviderFactory {
+ public:
+ WebControllerProviderFactory();
+ virtual ~WebControllerProviderFactory();
+
+ // Vends WebControllerProviders created using |browser_state|, passing
+ // ownership to callers.
+ virtual std::unique_ptr<WebControllerProvider> CreateWebControllerProvider(
+ web::BrowserState* browser_state);
+};
+
+// Setter and getter for the provider factory. The provider factory should be
+// set early, before any component using WebControllerProviders is called.
+void SetWebControllerProviderFactory(
+ WebControllerProviderFactory* provider_factory);
+WebControllerProviderFactory* GetWebControllerProviderFactory();
+
+} // namespace ios
+
+#endif // IOS_PUBLIC_PROVIDER_WEB_WEB_CONTROLLER_PROVIDER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698