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

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

Issue 1915153002: EDK: Add Dispatcher::SupportsEntrypointClass(). (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/mock_simple_dispatcher.h ('k') | mojo/edk/system/platform_handle_dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mock_simple_dispatcher.h" 5 #include "mojo/edk/system/mock_simple_dispatcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/edk/util/thread_annotations.h" 8 #include "mojo/edk/util/thread_annotations.h"
9 9
10 using mojo::util::MakeRefCounted; 10 using mojo::util::MakeRefCounted;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 return; 43 return;
44 44
45 state_.satisfiable_signals = new_satisfiable_signals; 45 state_.satisfiable_signals = new_satisfiable_signals;
46 HandleSignalsStateChangedNoLock(); 46 HandleSignalsStateChangedNoLock();
47 } 47 }
48 48
49 Dispatcher::Type MockSimpleDispatcher::GetType() const { 49 Dispatcher::Type MockSimpleDispatcher::GetType() const {
50 return Type::UNKNOWN; 50 return Type::UNKNOWN;
51 } 51 }
52 52
53 bool MockSimpleDispatcher::SupportsEntrypointClass(
54 EntrypointClass entrypoint_class) const {
55 return false;
56 }
57
53 MockSimpleDispatcher::MockSimpleDispatcher( 58 MockSimpleDispatcher::MockSimpleDispatcher(
54 MojoHandleSignals satisfied_signals, 59 MojoHandleSignals satisfied_signals,
55 MojoHandleSignals satisfiable_signals) 60 MojoHandleSignals satisfiable_signals)
56 : state_(satisfied_signals, satisfiable_signals) {} 61 : state_(satisfied_signals, satisfiable_signals) {}
57 62
58 MockSimpleDispatcher::MockSimpleDispatcher(const HandleSignalsState& state) 63 MockSimpleDispatcher::MockSimpleDispatcher(const HandleSignalsState& state)
59 : state_(state) {} 64 : state_(state) {}
60 65
61 MockSimpleDispatcher::~MockSimpleDispatcher() {} 66 MockSimpleDispatcher::~MockSimpleDispatcher() {}
62 67
63 RefPtr<Dispatcher> 68 RefPtr<Dispatcher>
64 MockSimpleDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() 69 MockSimpleDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock()
65 MOJO_NO_THREAD_SAFETY_ANALYSIS { 70 MOJO_NO_THREAD_SAFETY_ANALYSIS {
66 return MakeRefCounted<MockSimpleDispatcher>(state_); 71 return MakeRefCounted<MockSimpleDispatcher>(state_);
67 } 72 }
68 73
69 HandleSignalsState MockSimpleDispatcher::GetHandleSignalsStateImplNoLock() 74 HandleSignalsState MockSimpleDispatcher::GetHandleSignalsStateImplNoLock()
70 const { 75 const {
71 mutex().AssertHeld(); 76 mutex().AssertHeld();
72 return state_; 77 return state_;
73 } 78 }
74 79
75 } // namespace test 80 } // namespace test
76 } // namespace system 81 } // namespace system
77 } // namespace mojo 82 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/mock_simple_dispatcher.h ('k') | mojo/edk/system/platform_handle_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698