| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import "ios/public/provider/web/web_controller_provider_factory.h" | |
| 6 | |
| 7 #include "base/memory/ptr_util.h" | |
| 8 #import "ios/public/provider/web/web_controller_provider.h" | |
| 9 | |
| 10 #if !defined(__has_feature) || !__has_feature(objc_arc) | |
| 11 #error "This file requires ARC support." | |
| 12 #endif | |
| 13 | |
| 14 namespace ios { | |
| 15 namespace { | |
| 16 WebControllerProviderFactory* g_web_controller_provider_factory; | |
| 17 } | |
| 18 | |
| 19 WebControllerProviderFactory::WebControllerProviderFactory() {} | |
| 20 | |
| 21 WebControllerProviderFactory::~WebControllerProviderFactory() {} | |
| 22 | |
| 23 std::unique_ptr<WebControllerProvider> | |
| 24 WebControllerProviderFactory::CreateWebControllerProvider( | |
| 25 web::BrowserState* browser_state) { | |
| 26 return base::MakeUnique<WebControllerProvider>(browser_state); | |
| 27 } | |
| 28 | |
| 29 void SetWebControllerProviderFactory( | |
| 30 WebControllerProviderFactory* provider_factory) { | |
| 31 g_web_controller_provider_factory = provider_factory; | |
| 32 } | |
| 33 | |
| 34 WebControllerProviderFactory* GetWebControllerProviderFactory() { | |
| 35 return g_web_controller_provider_factory; | |
| 36 } | |
| 37 | |
| 38 } // namespace ios | |
| OLD | NEW |