| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_PLATFORM_SHARED_BUFFER_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_PLATFORM_SHARED_BUFFER_H_ |
| 6 #define THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_PLATFORM_SHARED_BUFFER_H_ | 6 #define MOJO_EDK_EMBEDDER_PLATFORM_SHARED_BUFFER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "mojo/edk/embedder/scoped_platform_handle.h" |
| 13 #include "mojo/edk/system/system_impl_export.h" |
| 12 #include "mojo/public/cpp/system/macros.h" | 14 #include "mojo/public/cpp/system/macros.h" |
| 13 #include "third_party/mojo/src/mojo/edk/embedder/scoped_platform_handle.h" | |
| 14 #include "third_party/mojo/src/mojo/edk/system/system_impl_export.h" | |
| 15 | 15 |
| 16 namespace mojo { | 16 namespace mojo { |
| 17 namespace embedder { | 17 namespace edk { |
| 18 | 18 |
| 19 class PlatformSharedBufferMapping; | 19 class PlatformSharedBufferMapping; |
| 20 | 20 |
| 21 // |PlatformSharedBuffer| is an interface for a thread-safe, ref-counted wrapper | 21 // |PlatformSharedBuffer| is an interface for a thread-safe, ref-counted wrapper |
| 22 // around OS-specific shared memory. It has the following features: | 22 // around OS-specific shared memory. It has the following features: |
| 23 // - A |PlatformSharedBuffer| simply represents a piece of shared memory that | 23 // - A |PlatformSharedBuffer| simply represents a piece of shared memory that |
| 24 // *may* be mapped and *may* be shared to another process. | 24 // *may* be mapped and *may* be shared to another process. |
| 25 // - A single |PlatformSharedBuffer| may be mapped multiple times. The | 25 // - A single |PlatformSharedBuffer| may be mapped multiple times. The |
| 26 // lifetime of the mapping (owned by |PlatformSharedBufferMapping|) is | 26 // lifetime of the mapping (owned by |PlatformSharedBufferMapping|) is |
| 27 // separate from the lifetime of the |PlatformSharedBuffer|. | 27 // separate from the lifetime of the |PlatformSharedBuffer|. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 virtual void* GetBase() const = 0; | 89 virtual void* GetBase() const = 0; |
| 90 virtual size_t GetLength() const = 0; | 90 virtual size_t GetLength() const = 0; |
| 91 | 91 |
| 92 protected: | 92 protected: |
| 93 PlatformSharedBufferMapping() {} | 93 PlatformSharedBufferMapping() {} |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformSharedBufferMapping); | 96 MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformSharedBufferMapping); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace embedder | 99 } // namespace edk |
| 100 } // namespace mojo | 100 } // namespace mojo |
| 101 | 101 |
| 102 #endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_PLATFORM_SHARED_BUFFER_H_ | 102 #endif // MOJO_EDK_EMBEDDER_PLATFORM_SHARED_BUFFER_H_ |
| OLD | NEW |