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.
5 #include "ios/public/provider/web/web_controller_provider.h"
9 static WebControllerProviderFactory* g_web_controller_provider_factory;
11 void SetWebControllerProviderFactory(
12 WebControllerProviderFactory* provider_factory) {
13 g_web_controller_provider_factory = provider_factory;
16 WebControllerProviderFactory* GetWebControllerProviderFactory() {
17 return g_web_controller_provider_factory;
20 WebControllerProvider::WebControllerProvider(web::BrowserState* browser_state) {
23 WebControllerProvider::~WebControllerProvider() {
26 bool WebControllerProvider::SuppressesDialogs() const {
30 web::WebState* WebControllerProvider::GetWebState() const {
34 void WebControllerProvider::InjectScript(const std::string& script,
35 web::JavaScriptCompletion completion) {
40 WebControllerProviderFactory::WebControllerProviderFactory() {
43 WebControllerProviderFactory::~WebControllerProviderFactory() {
46 scoped_ptr<WebControllerProvider>
47 WebControllerProviderFactory::CreateWebControllerProvider(
48 web::BrowserState* browser_state) {
49 return scoped_ptr<WebControllerProvider>(
50 new WebControllerProvider(browser_state));