| Index: android_webview/browser/gl_surface_factory.h
|
| diff --git a/android_webview/browser/gl_surface_factory.h b/android_webview/browser/gl_surface_factory.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9ae083ff1d5eaffc99080e34ce752cbc0f946cb7
|
| --- /dev/null
|
| +++ b/android_webview/browser/gl_surface_factory.h
|
| @@ -0,0 +1,36 @@
|
| +// Copyright (c) 2013 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 ANDROID_WEBVIEW_BROWSER_GL_SURFACE_FACTORY_H_
|
| +#define ANDROID_WEBVIEW_BROWSER_GL_SURFACE_FACTORY_H_
|
| +
|
| +#include "base/callback.h"
|
| +#include "base/memory/ref_counted.h"
|
| +#include "ui/gl/android/surface_factory_android.h"
|
| +#include "ui/gl/gl_surface.h"
|
| +
|
| +namespace android_webview {
|
| +
|
| +class GLSurfaceFactory : public gfx::SurfaceFactoryAndroid {
|
| + public:
|
| + static GLSurfaceFactory* GetInstance();
|
| +
|
| + GLSurfaceFactory();
|
| + virtual ~GLSurfaceFactory();
|
| +
|
| + typedef base::Callback<scoped_refptr<gfx::GLSurface>()> CreateSurfaceCallback;
|
| + void SetNextCallback(const CreateSurfaceCallback& callback);
|
| + void ResetCallback();
|
| +
|
| + virtual scoped_refptr<gfx::GLSurface> CreateNonOwnedViewSurface() OVERRIDE;
|
| +
|
| + private:
|
| + CreateSurfaceCallback create_callback_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(GLSurfaceFactory);
|
| +};
|
| +
|
| +} // namespace android_webview
|
| +
|
| +#endif // ANDROID_WEBVIEW_BROWSER_GL_SURFACE_FACTORY_H_
|
|
|