Update broken references to image assets
[chromium-blink-merge.git] / content / plugin / webplugin_accelerated_surface_proxy_mac.h
blob09b1b6469feaf86c2951e5a2924f1e6efa8578e8
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_MAC_H_
6 #define CONTENT_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_MAC_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 ~WebPluginAcceleratedSurfaceProxy() override;
30 // WebPluginAcceleratedSurface implementation.
31 void SetSize(const gfx::Size& size) override;
32 CGLContextObj context() override;
33 void StartDrawing() override;
34 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_MAC_H_