| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_ | 5 #ifndef CONTENT_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_ |
| 6 #define CONTENT_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_ | 6 #define CONTENT_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "ui/gl/gpu_preference.h" | 9 #include "ui/gl/gpu_preference.h" |
| 10 #include "webkit/plugins/npapi/webplugin_accelerated_surface_mac.h" | 10 #include "webkit/plugins/npapi/webplugin_accelerated_surface_mac.h" |
| 11 | 11 |
| 12 class AcceleratedSurface; |
| 13 |
| 14 namespace content { |
| 12 class WebPluginProxy; | 15 class WebPluginProxy; |
| 13 class AcceleratedSurface; | |
| 14 | 16 |
| 15 // Out-of-process implementation of WebPluginAcceleratedSurface that proxies | 17 // Out-of-process implementation of WebPluginAcceleratedSurface that proxies |
| 16 // calls through a WebPluginProxy. | 18 // calls through a WebPluginProxy. |
| 17 class WebPluginAcceleratedSurfaceProxy | 19 class WebPluginAcceleratedSurfaceProxy |
| 18 : public webkit::npapi::WebPluginAcceleratedSurface { | 20 : public webkit::npapi::WebPluginAcceleratedSurface { |
| 19 public: | 21 public: |
| 20 // Creates a new WebPluginAcceleratedSurfaceProxy that uses plugin_proxy | 22 // Creates a new WebPluginAcceleratedSurfaceProxy that uses plugin_proxy |
| 21 // to proxy calls. plugin_proxy must outlive this object. Returns NULL if | 23 // to proxy calls. plugin_proxy must outlive this object. Returns NULL if |
| 22 // initialization fails. | 24 // initialization fails. |
| 23 static WebPluginAcceleratedSurfaceProxy* Create( | 25 static WebPluginAcceleratedSurfaceProxy* Create( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 40 bool composited); | 42 bool composited); |
| 41 | 43 |
| 42 WebPluginProxy* plugin_proxy_; // Weak ref. | 44 WebPluginProxy* plugin_proxy_; // Weak ref. |
| 43 gfx::PluginWindowHandle window_handle_; | 45 gfx::PluginWindowHandle window_handle_; |
| 44 AcceleratedSurface* surface_; | 46 AcceleratedSurface* surface_; |
| 45 bool composited_; | 47 bool composited_; |
| 46 | 48 |
| 47 DISALLOW_COPY_AND_ASSIGN(WebPluginAcceleratedSurfaceProxy); | 49 DISALLOW_COPY_AND_ASSIGN(WebPluginAcceleratedSurfaceProxy); |
| 48 }; | 50 }; |
| 49 | 51 |
| 52 } // namespace content |
| 53 |
| 50 #endif // CONTENT_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_ | 54 #endif // CONTENT_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_ |
| OLD | NEW |