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

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

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.mm
diff --git a/ios/public/provider/web/web_controller_provider_factory.mm b/ios/public/provider/web/web_controller_provider_factory.mm
new file mode 100644
index 0000000000000000000000000000000000000000..9fe46f931fe8b6c039d00cdc568301e6b7346aef
--- /dev/null
+++ b/ios/public/provider/web/web_controller_provider_factory.mm
@@ -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.
+
+#import "ios/public/provider/web/web_controller_provider_factory.h"
+
+#include "base/memory/ptr_util.h"
+#import "ios/public/provider/web/web_controller_provider.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace ios {
+namespace {
+WebControllerProviderFactory* g_web_controller_provider_factory;
+}
+
+WebControllerProviderFactory::WebControllerProviderFactory() {}
+
+WebControllerProviderFactory::~WebControllerProviderFactory() {}
+
+std::unique_ptr<WebControllerProvider>
+WebControllerProviderFactory::CreateWebControllerProvider(
+ web::BrowserState* browser_state) {
+ return base::MakeUnique<WebControllerProvider>(browser_state);
+}
+
+void SetWebControllerProviderFactory(
+ WebControllerProviderFactory* provider_factory) {
+ g_web_controller_provider_factory = provider_factory;
+}
+
+WebControllerProviderFactory* GetWebControllerProviderFactory() {
+ return g_web_controller_provider_factory;
+}
+
+} // namespace ios

Powered by Google App Engine
This is Rietveld 408576698