[content shell] hook up testRunner.dumpEditingCallbacks
[chromium-blink-merge.git] / content / common / android / surface_texture_peer.h
blob476012725f8da199284b6f2a2d2a66b7b6da2c1b
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 #ifndef CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_
6 #define CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_
8 #include "base/process.h"
9 #include "content/common/android/surface_texture_bridge.h"
11 namespace content {
13 class SurfaceTexturePeer {
14 public:
15 enum SurfaceTextureTarget {
16 // These are used in java so don't change them unless we can
17 // share an enum from java and remove this enum.
18 SET_GPU_SURFACE_TEXTURE = 0, // Contains gpu surface_texture_ and id
19 SET_VIDEO_SURFACE_TEXTURE = 1, // contains video surface_texture_ and id
22 static SurfaceTexturePeer* GetInstance();
24 static void InitInstance(SurfaceTexturePeer* instance);
26 // Establish the producer end for the given surface texture in another
27 // process.
28 virtual void EstablishSurfaceTexturePeer(
29 base::ProcessHandle pid,
30 SurfaceTextureTarget type,
31 scoped_refptr<SurfaceTextureBridge> surface_texture_bridge,
32 int primary_id,
33 int secondary_id) = 0;
35 protected:
36 SurfaceTexturePeer();
37 virtual ~SurfaceTexturePeer();
39 private:
40 DISALLOW_COPY_AND_ASSIGN(SurfaceTexturePeer);
43 } // namespace content
45 #endif // CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_