Remove PlatformFile from profile_browsertest
[chromium-blink-merge.git] / content / plugin / webplugin_accelerated_surface_proxy_mac.h
blobd3b115a6e5d07e892891fe93a88827928b95063c
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_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_
6 #define CONTENT_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_
8 #include "base/compiler_specific.h"
9 #include "content/child/npapi/webplugin_accelerated_surface_mac.h"
10 #include "ui/gl/gpu_preference.h"
12 class AcceleratedSurface;
14 namespace content {
15 class WebPluginProxy;
17 // Out-of-process implementation of WebPluginAcceleratedSurface that proxies
18 // calls through a WebPluginProxy.
19 class WebPluginAcceleratedSurfaceProxy : public WebPluginAcceleratedSurface {
20 public:
21 // Creates a new WebPluginAcceleratedSurfaceProxy that uses plugin_proxy
22 // to proxy calls. plugin_proxy must outlive this object. Returns NULL if
23 // initialization fails.
24 static WebPluginAcceleratedSurfaceProxy* Create(
25 WebPluginProxy* plugin_proxy,
26 gfx::GpuPreference gpu_preference);
28 virtual ~WebPluginAcceleratedSurfaceProxy();
30 // WebPluginAcceleratedSurface implementation.
31 virtual void SetSize(const gfx::Size& size) OVERRIDE;
32 virtual CGLContextObj context() OVERRIDE;
33 virtual void StartDrawing() OVERRIDE;
34 virtual void EndDrawing() OVERRIDE;
36 private:
37 WebPluginAcceleratedSurfaceProxy(WebPluginProxy* plugin_proxy,
38 AcceleratedSurface* surface);
40 WebPluginProxy* plugin_proxy_; // Weak ref.
41 AcceleratedSurface* surface_;
43 DISALLOW_COPY_AND_ASSIGN(WebPluginAcceleratedSurfaceProxy);
46 } // namespace content
48 #endif // CONTENT_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_