| Index: content/public/browser/android/context_provider_factory.h
|
| diff --git a/content/public/browser/android/context_provider_factory.h b/content/public/browser/android/context_provider_factory.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1360b5ac995281282069cc63ce56b059f5486fd7
|
| --- /dev/null
|
| +++ b/content/public/browser/android/context_provider_factory.h
|
| @@ -0,0 +1,46 @@
|
| +// 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.
|
| +
|
| +#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_CONTEXT_PROVIDER_FACTORY_H_
|
| +#define CONTENT_PUBLIC_BROWSER_ANDROID_CONTEXT_PROVIDER_FACTORY_H_
|
| +
|
| +#include "base/callback.h"
|
| +#include "base/memory/ref_counted.h"
|
| +#include "content/common/content_export.h"
|
| +
|
| +namespace cc {
|
| +class ContextProvider;
|
| +class VulkanContextProvider;
|
| +}
|
| +
|
| +namespace content {
|
| +
|
| +// This class is not thread-safe and should only be accessed from the UI thread.
|
| +class CONTENT_EXPORT ContextProviderFactory {
|
| + public:
|
| + struct ContextProviders {
|
| + ContextProviders();
|
| + ~ContextProviders();
|
| +
|
| + scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider;
|
| +
|
| + scoped_refptr<cc::ContextProvider> compositor_context_provider;
|
| + scoped_refptr<cc::ContextProvider> worker_context_provider;
|
| + };
|
| +
|
| + using ContextProviderCallback = base::Callback<void(const ContextProviders&)>;
|
| +
|
| + static ContextProviderFactory* GetInstance();
|
| +
|
| + virtual ~ContextProviderFactory(){};
|
| +
|
| + // Creates a ContextProvider with an offscreen context for a compositor
|
| + // rendering web content.
|
| + virtual void RequestRenderContextProvider(
|
| + ContextProviderCallback result_callback) = 0;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTEXT_PROVIDER_FACTORY_H_
|
|
|