Suppress sending mousedown / mouseup when in fling
[chromium-blink-merge.git] / content / browser / renderer_host / surface_texture_transport_client_android.h
blob50374437465bbbc265315a5e0bb548b181cbcdbc
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_BROWSER_RENDERER_HOST_SURFACE_TEXTURE_TRANSPORT_CLIENT_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_SURFACE_TEXTURE_TRANSPORT_CLIENT_ANDROID_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebVideoFrameProvider.h"
11 #include "ui/gfx/native_widget_types.h"
13 struct ANativeWindow;
15 namespace cc {
16 class Layer;
17 class VideoLayer;
20 namespace content {
21 class SurfaceTextureBridge;
23 class SurfaceTextureTransportClient : public WebKit::WebVideoFrameProvider {
24 public:
25 SurfaceTextureTransportClient();
26 virtual ~SurfaceTextureTransportClient();
28 scoped_refptr<cc::Layer> Initialize();
29 gfx::GLSurfaceHandle GetCompositingSurface(int surface_id);
30 void SetSize(const gfx::Size& size);
32 // WebKit::WebVideoFrameProvider implementation.
33 virtual void setVideoFrameProviderClient(Client*) OVERRIDE {}
34 virtual WebKit::WebVideoFrame* getCurrentFrame() OVERRIDE;
35 virtual void putCurrentFrame(WebKit::WebVideoFrame* frame) OVERRIDE;
37 private:
38 void OnSurfaceTextureFrameAvailable();
40 scoped_refptr<cc::VideoLayer> video_layer_;
41 scoped_refptr<SurfaceTextureBridge> surface_texture_;
42 ANativeWindow* window_;
43 scoped_ptr<WebKit::WebVideoFrame> video_frame_;
44 uint32 texture_id_;
46 DISALLOW_COPY_AND_ASSIGN(SurfaceTextureTransportClient);
49 } // namespace content
51 #endif // CONTENT_BROWSER_RENDERER_HOST_SURFACE_TEXTURE_TRANSPORT_CLIENT_ANDROID_H_