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

Side by Side Diff: mojo/edk/system/core_test_base.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 | « no previous file | mojo/edk/system/data_pipe_consumer_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 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/core_test_base.h" 5 #include "mojo/edk/system/core_test_base.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "mojo/edk/embedder/simple_platform_support.h" 10 #include "mojo/edk/embedder/simple_platform_support.h"
(...skipping 14 matching lines...) Expand all
25 namespace { 25 namespace {
26 26
27 // MockDispatcher -------------------------------------------------------------- 27 // MockDispatcher --------------------------------------------------------------
28 28
29 class MockDispatcher : public Dispatcher { 29 class MockDispatcher : public Dispatcher {
30 public: 30 public:
31 static RefPtr<MockDispatcher> Create(CoreTestBase::MockHandleInfo* info) { 31 static RefPtr<MockDispatcher> Create(CoreTestBase::MockHandleInfo* info) {
32 return AdoptRef(new MockDispatcher(info)); 32 return AdoptRef(new MockDispatcher(info));
33 } 33 }
34 34
35 // |Dispatcher| private methods: 35 // |Dispatcher| public methods:
36 Type GetType() const override { return Type::UNKNOWN; } 36 Type GetType() const override { return Type::UNKNOWN; }
37 37
38 bool SupportsEntrypointClass(
39 EntrypointClass entrypoint_class) const override {
40 return true;
41 }
42
38 private: 43 private:
39 explicit MockDispatcher(CoreTestBase::MockHandleInfo* info) : info_(info) { 44 explicit MockDispatcher(CoreTestBase::MockHandleInfo* info) : info_(info) {
40 CHECK(info_); 45 CHECK(info_);
41 info_->IncrementCtorCallCount(); 46 info_->IncrementCtorCallCount();
42 } 47 }
43 48
44 ~MockDispatcher() override { info_->IncrementDtorCallCount(); } 49 ~MockDispatcher() override { info_->IncrementDtorCallCount(); }
45 50
46 // |Dispatcher| protected methods: 51 // |Dispatcher| protected methods:
47 void CloseImplNoLock() override { 52 void CloseImplNoLock() override {
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 425 }
421 426
422 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { 427 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) {
423 MutexLocker locker(&mutex_); 428 MutexLocker locker(&mutex_);
424 added_awakables_.push_back(awakable); 429 added_awakables_.push_back(awakable);
425 } 430 }
426 431
427 } // namespace test 432 } // namespace test
428 } // namespace system 433 } // namespace system
429 } // namespace mojo 434 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/data_pipe_consumer_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698