Chromium Code Reviews| Index: ui/android/context_provider_factory.cc |
| diff --git a/ui/android/context_provider_factory.cc b/ui/android/context_provider_factory.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e64ef5df0ca0591c0507d8781e50aad8f6770b1c |
| --- /dev/null |
| +++ b/ui/android/context_provider_factory.cc |
| @@ -0,0 +1,30 @@ |
| +// 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. |
| + |
| +#include "cc/output/context_provider.h" |
| +#include "cc/output/vulkan_in_process_context_provider.h" |
| +#include "ui/android/context_provider_factory.h" |
|
no sievers
2016/07/29 19:14:31
nit: put this include at the top with an empty lin
|
| + |
| +namespace ui { |
| + |
| +ContextProviderFactory* g_context_provider_factory = nullptr; |
| + |
| +// static |
| +ContextProviderFactory* ContextProviderFactory::GetInstance() { |
| + return g_context_provider_factory; |
| +} |
| + |
| +// static |
| +void ContextProviderFactory::SetInstance( |
| + ContextProviderFactory* context_provider_factory) { |
| + DCHECK(!g_context_provider_factory); |
| + |
| + g_context_provider_factory = context_provider_factory; |
| +} |
| + |
| +ContextProviderFactory::ContextProviders::ContextProviders() = default; |
| + |
| +ContextProviderFactory::ContextProviders::~ContextProviders() = default; |
| + |
| +} // namespace ui |