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

Side by Side Diff: mojo/edk/system/data_pipe_consumer_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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/data_pipe_consumer_dispatcher.h" 5 #include "mojo/edk/system/data_pipe_consumer_dispatcher.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "mojo/edk/system/data_pipe.h" 10 #include "mojo/edk/system/data_pipe.h"
11 #include "mojo/edk/system/memory.h" 11 #include "mojo/edk/system/memory.h"
12 #include "mojo/edk/system/options_validation.h" 12 #include "mojo/edk/system/options_validation.h"
13 13
14 using mojo::platform::ScopedPlatformHandle; 14 using mojo::platform::ScopedPlatformHandle;
15 using mojo::util::MutexLocker; 15 using mojo::util::MutexLocker;
16 using mojo::util::RefPtr; 16 using mojo::util::RefPtr;
17 17
18 namespace mojo { 18 namespace mojo {
19 namespace system { 19 namespace system {
20 20
21 // static
22 constexpr MojoHandleRights DataPipeConsumerDispatcher::kDefaultHandleRights;
23
21 void DataPipeConsumerDispatcher::Init(RefPtr<DataPipe>&& data_pipe) { 24 void DataPipeConsumerDispatcher::Init(RefPtr<DataPipe>&& data_pipe) {
22 DCHECK(data_pipe); 25 DCHECK(data_pipe);
23 data_pipe_ = std::move(data_pipe); 26 data_pipe_ = std::move(data_pipe);
24 } 27 }
25 28
26 Dispatcher::Type DataPipeConsumerDispatcher::GetType() const { 29 Dispatcher::Type DataPipeConsumerDispatcher::GetType() const {
27 return Type::DATA_PIPE_CONSUMER; 30 return Type::DATA_PIPE_CONSUMER;
28 } 31 }
29 32
30 bool DataPipeConsumerDispatcher::SupportsEntrypointClass( 33 bool DataPipeConsumerDispatcher::SupportsEntrypointClass(
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 return rv; 229 return rv;
227 } 230 }
228 231
229 bool DataPipeConsumerDispatcher::IsBusyNoLock() const { 232 bool DataPipeConsumerDispatcher::IsBusyNoLock() const {
230 mutex().AssertHeld(); 233 mutex().AssertHeld();
231 return data_pipe_->ConsumerIsBusy(); 234 return data_pipe_->ConsumerIsBusy();
232 } 235 }
233 236
234 } // namespace system 237 } // namespace system
235 } // namespace mojo 238 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/data_pipe_consumer_dispatcher.h ('k') | mojo/edk/system/data_pipe_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698