Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / content / common / android / surface_texture_manager.h
blobcff81b983196c9e5172a35cc895baf963c34cb02
1 // Copyright 2014 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 #ifndef CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_
6 #define CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_
8 #include "content/common/content_export.h"
9 #include "ui/gfx/native_widget_types.h"
11 namespace gfx {
12 class SurfaceTexture;
15 namespace content {
17 class CONTENT_EXPORT SurfaceTextureManager {
18 public:
19 static SurfaceTextureManager* GetInstance();
20 static void InitInstance(SurfaceTextureManager* instance);
22 // Register a surface texture for use in another process.
23 virtual void RegisterSurfaceTexture(int surface_texture_id,
24 int client_id,
25 gfx::SurfaceTexture* surface_texture) = 0;
27 // Unregister a surface texture previously registered for use in another
28 // process.
29 virtual void UnregisterSurfaceTexture(int surface_texture_id,
30 int client_id) = 0;
32 // Acquire native widget for a registered surface texture.
33 virtual gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
34 int surface_texture_id) = 0;
36 protected:
37 virtual ~SurfaceTextureManager() {}
40 } // namespace content
42 #endif // CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_