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 #include "mojo/edk/embedder/simple_platform_shared_buffer.h" | 5 #include "mojo/embedder/simple_platform_shared_buffer.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "mojo/edk/embedder/platform_handle_utils.h" | 8 #include "mojo/embedder/platform_handle_utils.h" |
9 | 9 |
10 namespace mojo { | 10 namespace mojo { |
11 namespace embedder { | 11 namespace embedder { |
12 | 12 |
13 // static | 13 // static |
14 SimplePlatformSharedBuffer* SimplePlatformSharedBuffer::Create( | 14 SimplePlatformSharedBuffer* SimplePlatformSharedBuffer::Create( |
15 size_t num_bytes) { | 15 size_t num_bytes) { |
16 DCHECK_GT(num_bytes, 0u); | 16 DCHECK_GT(num_bytes, 0u); |
17 | 17 |
18 SimplePlatformSharedBuffer* rv = new SimplePlatformSharedBuffer(num_bytes); | 18 SimplePlatformSharedBuffer* rv = new SimplePlatformSharedBuffer(num_bytes); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 void* SimplePlatformSharedBufferMapping::GetBase() const { | 99 void* SimplePlatformSharedBufferMapping::GetBase() const { |
100 return base_; | 100 return base_; |
101 } | 101 } |
102 | 102 |
103 size_t SimplePlatformSharedBufferMapping::GetLength() const { | 103 size_t SimplePlatformSharedBufferMapping::GetLength() const { |
104 return length_; | 104 return length_; |
105 } | 105 } |
106 | 106 |
107 } // namespace embedder | 107 } // namespace embedder |
108 } // namespace mojo | 108 } // namespace mojo |
OLD | NEW |