Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / android_webview / lib / aw_browser_dependency_factory_impl.cc
blobb054881cbe45fb182a0e10a339edbab39f96cb5f
1 // Copyright (c) 2012 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 "android_webview/lib/aw_browser_dependency_factory_impl.h"
7 #include "android_webview/browser/aw_browser_context.h"
8 #include "android_webview/browser/aw_content_browser_client.h"
9 #include "base/lazy_instance.h"
10 #include "content/public/browser/content_browser_client.h"
11 #include "content/public/browser/web_contents.h"
12 #include "content/public/common/content_client.h"
14 using content::BrowserContext;
15 using content::WebContents;
17 namespace android_webview {
19 namespace {
21 base::LazyInstance<AwBrowserDependencyFactoryImpl>::Leaky g_lazy_instance;
23 } // namespace
25 AwBrowserDependencyFactoryImpl::AwBrowserDependencyFactoryImpl() {}
27 AwBrowserDependencyFactoryImpl::~AwBrowserDependencyFactoryImpl() {}
29 // static
30 void AwBrowserDependencyFactoryImpl::InstallInstance() {
31 SetInstance(g_lazy_instance.Pointer());
34 content::BrowserContext* AwBrowserDependencyFactoryImpl::GetBrowserContext() {
35 return AwContentBrowserClient::GetAwBrowserContext();
38 WebContents* AwBrowserDependencyFactoryImpl::CreateWebContents() {
39 return content::WebContents::Create(
40 content::WebContents::CreateParams(GetBrowserContext()));
43 } // namespace android_webview