Chromium Code Reviews| Index: content/browser/android/surface_texture_peer_browser_impl.h |
| diff --git a/content/browser/android/surface_texture_peer_browser_impl.h b/content/browser/android/surface_texture_peer_browser_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6a88f5681738300c5d7c6a5c6b58273a986b16dc |
| --- /dev/null |
| +++ b/content/browser/android/surface_texture_peer_browser_impl.h |
| @@ -0,0 +1,41 @@ |
| +// 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/android/scoped_java_ref.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: |
| + explicit SurfaceTexturePeerBrowserImpl(bool player_in_render_process); |
| + |
| + virtual ~SurfaceTexturePeerBrowserImpl(); |
| + |
| + // Methods inherited from SurfaceTexturePeer. |
| + virtual void EstablishSurfaceTexturePeer(base::ProcessHandle pid, |
| + SurfaceTextureTarget type, |
| + jobject j_surface_texture, |
| + int primary_id, |
| + int secondary_id) OVERRIDE; |
| + |
| + private: |
| + // Whether the mediaplayer is in render process |
| + bool player_in_render_process_; |
| + |
| + base::android::ScopedJavaGlobalRef<jobject> surface_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SurfaceTexturePeerBrowserImpl); |
| +}; |
| + |
| +bool RegisterBrowserProcessSurfaceTexture(JNIEnv* env); |
|
Yaron
2012/09/05 07:03:56
Nit: move to static method of above class
qinmin
2012/09/05 19:34:42
Done.
|
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_ANDROID_SURFACE_TEXTURE_PEER_BROWSER_IMPL_H_ |