| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 protected: | 122 protected: |
| 123 virtual ~Client() {} | 123 virtual ~Client() {} |
| 124 | 124 |
| 125 public: | 125 public: |
| 126 // Called when the stream is created. | 126 // Called when the stream is created. |
| 127 virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle, | 127 virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle, |
| 128 size_t shared_memory_size, | 128 size_t shared_memory_size, |
| 129 base::SyncSocket::Handle socket) = 0; | 129 base::SyncSocket::Handle socket) = 0; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 virtual ~PlatformAudio() {} | |
| 133 | |
| 134 // Starts the playback. Returns false on error or if called before the | 132 // Starts the playback. Returns false on error or if called before the |
| 135 // stream is created or after the stream is closed. | 133 // stream is created or after the stream is closed. |
| 136 virtual bool StartPlayback() = 0; | 134 virtual bool StartPlayback() = 0; |
| 137 | 135 |
| 138 // Stops the playback. Returns false on error or if called before the stream | 136 // Stops the playback. Returns false on error or if called before the stream |
| 139 // is created or after the stream is closed. | 137 // is created or after the stream is closed. |
| 140 virtual bool StopPlayback() = 0; | 138 virtual bool StopPlayback() = 0; |
| 141 | 139 |
| 142 // Closes the stream. Make sure to call this before the object is | 140 // Closes the stream. Make sure to call this before the object is |
| 143 // destructed. | 141 // destructed. |
| 144 virtual void ShutDown() = 0; | 142 virtual void ShutDown() = 0; |
| 143 |
| 144 protected: |
| 145 virtual ~PlatformAudio() {} |
| 145 }; | 146 }; |
| 146 | 147 |
| 147 class PlatformVideoDecoder { | 148 class PlatformVideoDecoder { |
| 148 public: | 149 public: |
| 149 virtual ~PlatformVideoDecoder() {} | 150 virtual ~PlatformVideoDecoder() {} |
| 150 | 151 |
| 151 // Returns false on failure. | 152 // Returns false on failure. |
| 152 virtual bool Decode(PP_VideoCompressedDataBuffer_Dev& input_buffer) = 0; | 153 virtual bool Decode(PP_VideoCompressedDataBuffer_Dev& input_buffer) = 0; |
| 153 virtual int32_t Flush(PP_CompletionCallback& callback) = 0; | 154 virtual int32_t Flush(PP_CompletionCallback& callback) = 0; |
| 154 virtual bool ReturnUncompressedDataBuffer( | 155 virtual bool ReturnUncompressedDataBuffer( |
| (...skipping 116 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 |