| OLD | NEW | 
|   1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |   1 // Copyright (c) 2010 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 WEBKIT_GLUE_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ |   5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ | 
|   6 #define WEBKIT_GLUE_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ |   6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ | 
|   7 #pragma once |   7 #pragma once | 
|   8  |   8  | 
|   9 #include "gfx/native_widget_types.h" |   9 #include "gfx/native_widget_types.h" | 
|  10 #include "gfx/size.h" |  10 #include "gfx/size.h" | 
|  11  |  11  | 
|  12 // Avoid having to include OpenGL headers here. |  12 // Avoid having to include OpenGL headers here. | 
|  13 typedef struct _CGLContextObject* CGLContextObj; |  13 typedef struct _CGLContextObject* CGLContextObj; | 
|  14  |  14  | 
|  15 namespace webkit_glue { |  15 namespace webkit { | 
 |  16 namespace npapi { | 
|  16  |  17  | 
|  17 // Interface class for interacting with an accelerated plugin surface, used |  18 // Interface class for interacting with an accelerated plugin surface, used | 
|  18 // for the Core Animation flavors of plugin drawing on the Mac. |  19 // for the Core Animation flavors of plugin drawing on the Mac. | 
|  19 class WebPluginAcceleratedSurface { |  20 class WebPluginAcceleratedSurface { | 
|  20  public: |  21  public: | 
|  21   virtual ~WebPluginAcceleratedSurface() {} |  22   virtual ~WebPluginAcceleratedSurface() {} | 
|  22  |  23  | 
|  23   // Sets the window handle used throughout the browser to identify this |  24   // Sets the window handle used throughout the browser to identify this | 
|  24   // surface. |  25   // surface. | 
|  25   virtual void SetWindowHandle(gfx::PluginWindowHandle window) = 0; |  26   virtual void SetWindowHandle(gfx::PluginWindowHandle window) = 0; | 
|  26  |  27  | 
|  27   // Sets the size of the surface. |  28   // Sets the size of the surface. | 
|  28   virtual void SetSize(const gfx::Size& size) = 0; |  29   virtual void SetSize(const gfx::Size& size) = 0; | 
|  29  |  30  | 
|  30   // Returns the context used to draw into this surface. |  31   // Returns the context used to draw into this surface. | 
|  31   // If initializing the surface failed, this will be NULL. |  32   // If initializing the surface failed, this will be NULL. | 
|  32   virtual CGLContextObj context() = 0; |  33   virtual CGLContextObj context() = 0; | 
|  33  |  34  | 
|  34   // Readies the surface for drawing. Must be called before any drawing session. |  35   // Readies the surface for drawing. Must be called before any drawing session. | 
|  35   virtual void StartDrawing() = 0; |  36   virtual void StartDrawing() = 0; | 
|  36  |  37  | 
|  37   // Ends a drawing session. Changes to the surface may not be reflected until |  38   // Ends a drawing session. Changes to the surface may not be reflected until | 
|  38   // this is called. |  39   // this is called. | 
|  39   virtual void EndDrawing() = 0; |  40   virtual void EndDrawing() = 0; | 
|  40 }; |  41 }; | 
|  41  |  42  | 
|  42 }  // namespace webkit_glue |  43 }  // namespace npapi | 
 |  44 }  // namespace webkit | 
|  43  |  45  | 
|  44 #endif  // WEBKIT_GLUE_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ |  46 #endif  // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ | 
| OLD | NEW |