Home | History | Annotate | Download | only in android
      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.
      4 
      5 #ifndef CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_
      6 #define CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_
      7 
      8 #include "base/process/process.h"
      9 #include "ui/gl/android/surface_texture.h"
     10 
     11 namespace content {
     12 
     13 class SurfaceTexturePeer {
     14  public:
     15   static SurfaceTexturePeer* GetInstance();
     16 
     17   static void InitInstance(SurfaceTexturePeer* instance);
     18 
     19   // Establish the producer end for the given surface texture in another
     20   // process.
     21   virtual void EstablishSurfaceTexturePeer(
     22       base::ProcessHandle pid,
     23       scoped_refptr<gfx::SurfaceTexture> surface_texture,
     24       int primary_id,
     25       int secondary_id) = 0;
     26 
     27  protected:
     28   SurfaceTexturePeer();
     29   virtual ~SurfaceTexturePeer();
     30 
     31  private:
     32   DISALLOW_COPY_AND_ASSIGN(SurfaceTexturePeer);
     33 };
     34 
     35 }  // namespace content
     36 
     37 #endif  // CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_
     38