| Index: media/video/capture/screen/shared_buffer.h
|
| diff --git a/remoting/capturer/shared_buffer.h b/media/video/capture/screen/shared_buffer.h
|
| similarity index 83%
|
| rename from remoting/capturer/shared_buffer.h
|
| rename to media/video/capture/screen/shared_buffer.h
|
| index 16429b9fa19c3216c2eadc1cc1825dd0cdf673b4..4c77b6a0ef4505ca27832559935101f009db0f1f 100644
|
| --- a/remoting/capturer/shared_buffer.h
|
| +++ b/media/video/capture/screen/shared_buffer.h
|
| @@ -2,20 +2,21 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef REMOTING_CAPTURER_SHARED_BUFFER_H_
|
| -#define REMOTING_CAPTURER_SHARED_BUFFER_H_
|
| +#ifndef MEDIA_VIDEO_CAPTURE_SCREEN_SHARED_BUFFER_H_
|
| +#define MEDIA_VIDEO_CAPTURE_SCREEN_SHARED_BUFFER_H_
|
|
|
| #include "base/basictypes.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/process.h"
|
| #include "base/shared_memory.h"
|
| +#include "media/base/media_export.h"
|
|
|
| -namespace remoting {
|
| +namespace media {
|
|
|
| // Represents a memory buffer that can be shared between multiple processes.
|
| // It is more or less a convenience wrapper around base::SharedMemory providing
|
| // ref-counted lifetime management and unique buffer identifiers.
|
| -class SharedBuffer
|
| +class MEDIA_EXPORT SharedBuffer
|
| : public base::RefCountedThreadSafe<SharedBuffer> {
|
| public:
|
| // Creates a new shared memory buffer of the given size and maps it to
|
| @@ -43,6 +44,11 @@ class SharedBuffer
|
| // data buffer.
|
| base::SharedMemoryHandle handle() const { return shared_memory_.handle(); }
|
|
|
| + // Calls SharedMemory::ShareToProcess to share the handle with a different
|
| + // process.
|
| + bool ShareToProcess(base::ProcessHandle process,
|
| + base::SharedMemoryHandle* new_handle);
|
| +
|
| int id() const { return id_; }
|
| uint32 size() const { return size_; }
|
|
|
| @@ -64,6 +70,6 @@ class SharedBuffer
|
| DISALLOW_COPY_AND_ASSIGN(SharedBuffer);
|
| };
|
|
|
| -} // namespace remoting
|
| +} // namespace media
|
|
|
| -#endif // REMOTING_CAPTURER_SHARED_BUFFER_H_
|
| +#endif // MEDIA_VIDEO_CAPTURE_SCREEN_SHARED_BUFFER_H_
|
|
|