Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: mojo/edk/system/shared_buffer_dispatcher.cc

Issue 1946423002: EDK: Remove Core::AddDispatcher(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/edk/system/shared_buffer_dispatcher.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/system/shared_buffer_dispatcher.h" 5 #include "mojo/edk/system/shared_buffer_dispatcher.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 16 matching lines...) Expand all
27 namespace { 27 namespace {
28 28
29 struct MOJO_ALIGNAS(8) SerializedSharedBufferDispatcher { 29 struct MOJO_ALIGNAS(8) SerializedSharedBufferDispatcher {
30 uint64_t num_bytes; 30 uint64_t num_bytes;
31 uint32_t platform_handle_index; 31 uint32_t platform_handle_index;
32 }; 32 };
33 33
34 } // namespace 34 } // namespace
35 35
36 // static 36 // static
37 constexpr MojoHandleRights SharedBufferDispatcher::kDefaultHandleRights;
38
39 // static
37 const MojoCreateSharedBufferOptions 40 const MojoCreateSharedBufferOptions
38 SharedBufferDispatcher::kDefaultCreateOptions = { 41 SharedBufferDispatcher::kDefaultCreateOptions = {
39 static_cast<uint32_t>(sizeof(MojoCreateSharedBufferOptions)), 42 static_cast<uint32_t>(sizeof(MojoCreateSharedBufferOptions)),
40 MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE}; 43 MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE};
41 44
42 // static 45 // static
43 MojoResult SharedBufferDispatcher::ValidateCreateOptions( 46 MojoResult SharedBufferDispatcher::ValidateCreateOptions(
44 UserPointer<const MojoCreateSharedBufferOptions> in_options, 47 UserPointer<const MojoCreateSharedBufferOptions> in_options,
45 MojoCreateSharedBufferOptions* out_options) { 48 MojoCreateSharedBufferOptions* out_options) {
46 const MojoCreateSharedBufferOptionsFlags kKnownFlags = 49 const MojoCreateSharedBufferOptionsFlags kKnownFlags =
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 platform_handles->push_back(std::move(platform_handle)); 329 platform_handles->push_back(std::move(platform_handle));
327 *actual_size = sizeof(SerializedSharedBufferDispatcher); 330 *actual_size = sizeof(SerializedSharedBufferDispatcher);
328 331
329 shared_buffer_ = nullptr; 332 shared_buffer_ = nullptr;
330 333
331 return true; 334 return true;
332 } 335 }
333 336
334 } // namespace system 337 } // namespace system
335 } // namespace mojo 338 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/shared_buffer_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698