summaryrefslogtreecommitdiffstats
path: root/content/browser/android/surface_texture_peer_browser_impl.h
blob: ea3fd046553f99541bc99a1185bf7d69a9658c55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2012 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_BROWSER_ANDROID_SURFACE_TEXTURE_PEER_BROWSER_IMPL_H_
#define CONTENT_BROWSER_ANDROID_SURFACE_TEXTURE_PEER_BROWSER_IMPL_H_

#include "base/compiler_specific.h"
#include "content/common/android/surface_texture_peer.h"

namespace content {

// The SurfaceTexturePeer implementation for browser process.
class SurfaceTexturePeerBrowserImpl : public SurfaceTexturePeer {
 public:
  // Construct a SurfaceTexturePeerBrowserImpl object. If
  // |player_in_render_process| is true, calling EstablishSurfaceTexturePeer()
  // will send the java surface texture object to the render process through
  // ChildProcessService. Otherwise, it will pass the surface texture
  // to the MediaPlayerBridge object in the browser process.
  SurfaceTexturePeerBrowserImpl();
  virtual ~SurfaceTexturePeerBrowserImpl();

  // SurfaceTexturePeer implementation.
  virtual void EstablishSurfaceTexturePeer(
      base::ProcessHandle render_process_handle,
      scoped_refptr<gfx::SurfaceTexture> surface_texture,
      int render_frame_id,
      int player_id) OVERRIDE;

 private:
  DISALLOW_COPY_AND_ASSIGN(SurfaceTexturePeerBrowserImpl);
};

}  // namespace content

#endif  // CONTENT_BROWSER_ANDROID_SURFACE_TEXTURE_PEER_BROWSER_IMPL_H_