OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 #include "ios/public/provider/web/web_controller_provider.h" |
| 6 |
| 7 namespace ios { |
| 8 |
| 9 static WebControllerProviderFactory* g_web_controller_provider_factory; |
| 10 |
| 11 void SetWebControllerProviderFactory( |
| 12 WebControllerProviderFactory* provider_factory) { |
| 13 g_web_controller_provider_factory = provider_factory; |
| 14 } |
| 15 |
| 16 WebControllerProviderFactory* GetWebControllerProviderFactory() { |
| 17 return g_web_controller_provider_factory; |
| 18 } |
| 19 |
| 20 WebControllerProvider::WebControllerProvider(web::BrowserState* browser_state) { |
| 21 } |
| 22 |
| 23 WebControllerProvider::~WebControllerProvider() { |
| 24 } |
| 25 |
| 26 bool WebControllerProvider::SuppressesDialogs() const { |
| 27 return false; |
| 28 } |
| 29 |
| 30 web::WebState* WebControllerProvider::GetWebState() const { |
| 31 return nullptr; |
| 32 } |
| 33 |
| 34 void WebControllerProvider::InjectScript(const std::string& script, |
| 35 web::JavaScriptCompletion completion) { |
| 36 if (completion) |
| 37 completion(nil, nil); |
| 38 } |
| 39 |
| 40 WebControllerProviderFactory::WebControllerProviderFactory() { |
| 41 } |
| 42 |
| 43 WebControllerProviderFactory::~WebControllerProviderFactory() { |
| 44 } |
| 45 |
| 46 scoped_ptr<WebControllerProvider> |
| 47 WebControllerProviderFactory::CreateWebControllerProvider( |
| 48 web::BrowserState* browser_state) { |
| 49 return scoped_ptr<WebControllerProvider>( |
| 50 new WebControllerProvider(browser_state)); |
| 51 } |
| 52 |
| 53 } // namespace ios |
OLD | NEW |