| OLD | NEW |
| 1 // Copyright (c) 2010 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_PLUGINS_PEPPER_PLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_DELEGATE_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_DELEGATE_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // Represents an image. This is to allow the browser layer to supply a correct | 71 // Represents an image. This is to allow the browser layer to supply a correct |
| 72 // image representation. In Chrome, this will be a TransportDIB. | 72 // image representation. In Chrome, this will be a TransportDIB. |
| 73 class PlatformImage2D { | 73 class PlatformImage2D { |
| 74 public: | 74 public: |
| 75 virtual ~PlatformImage2D() {} | 75 virtual ~PlatformImage2D() {} |
| 76 | 76 |
| 77 // Caller will own the returned pointer, returns NULL on failure. | 77 // Caller will own the returned pointer, returns NULL on failure. |
| 78 virtual skia::PlatformCanvas* Map() = 0; | 78 virtual skia::PlatformCanvas* Map() = 0; |
| 79 | 79 |
| 80 // Returns the platform-specific shared memory handle of the data backing | 80 // Returns the platform-specific shared memory handle of the data backing |
| 81 // this image. This is used by NativeClient to send the image to the | 81 // this image. This is used by PPAPI proxying to send the image to the |
| 82 // out-of-process plugin. Returns 0 on failure. | 82 // out-of-process plugin. On success, the size in bytes will be placed into |
| 83 virtual intptr_t GetSharedMemoryHandle() const = 0; | 83 // |*bytes_count|. Returns 0 on failure. |
| 84 virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const = 0; |
| 84 | 85 |
| 85 virtual TransportDIB* GetTransportDIB() const = 0; | 86 virtual TransportDIB* GetTransportDIB() const = 0; |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 class PlatformContext3D { | 89 class PlatformContext3D { |
| 89 public: | 90 public: |
| 90 virtual ~PlatformContext3D() {} | 91 virtual ~PlatformContext3D() {} |
| 91 | 92 |
| 92 // Initialize the context. | 93 // Initialize the context. |
| 93 virtual bool Init() = 0; | 94 virtual bool Init() = 0; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 virtual void DidStartLoading() = 0; | 272 virtual void DidStartLoading() = 0; |
| 272 virtual void DidStopLoading() = 0; | 273 virtual void DidStopLoading() = 0; |
| 273 | 274 |
| 274 // Sets restrictions on how the content can be used (i.e. no print/copy). | 275 // Sets restrictions on how the content can be used (i.e. no print/copy). |
| 275 virtual void SetContentRestriction(int restrictions) = 0; | 276 virtual void SetContentRestriction(int restrictions) = 0; |
| 276 }; | 277 }; |
| 277 | 278 |
| 278 } // namespace pepper | 279 } // namespace pepper |
| 279 | 280 |
| 280 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_DELEGATE_H_ | 281 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_DELEGATE_H_ |
| OLD | NEW |