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

Side by Side Diff: mojo/edk/platform/test_message_loops.h

Issue 1507903006: EDK: Remove mojo::platform::MessageLoopForIO and add PlatformHandleWatcher. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // This file declares factory functions (which must be implemented by the 5 // This file declares factory functions (which must be implemented by the
6 // embedder) for message loops to be used in tests. 6 // embedder) for message loops to be used in tests.
7 7
8 #ifndef MOJO_EDK_PLATFORM_TEST_MESSAGE_LOOPS_H_ 8 #ifndef MOJO_EDK_PLATFORM_TEST_MESSAGE_LOOPS_H_
9 #define MOJO_EDK_PLATFORM_TEST_MESSAGE_LOOPS_H_ 9 #define MOJO_EDK_PLATFORM_TEST_MESSAGE_LOOPS_H_
10 10
11 #include <memory> 11 #include <memory>
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace platform { 14 namespace platform {
15 15
16 class MessageLoop; 16 class MessageLoop;
17 class MessageLoopForIO; 17 class PlatformHandleWatcher;
18 18
19 namespace test { 19 namespace test {
20 20
21 // Creates a basic |platform::MessageLoop|, to be used by tests. This must be 21 // Creates a basic |MessageLoop|, to be used by tests. This must be implemented
22 // implemented by the embedder (if building tests that require it). 22 // by the embedder (if building tests that require it).
23 std::unique_ptr<MessageLoop> CreateTestMessageLoop(); 23 std::unique_ptr<MessageLoop> CreateTestMessageLoop();
24 24
25 // Creates a basic |platform::MessageLoopForIO|, to be used by tests. This must 25 // Creates a basic |MessageLoop| that supports watching |PlatformHandle|s, to be
26 // be implemented by the embedder (if building tests that require it). 26 // used by tests. This must be implemented by the embedder (if building tests
27 std::unique_ptr<MessageLoopForIO> CreateTestMessageLoopForIO(); 27 // that require it). The "out" |PlatformHandleWatcher| is valid while the
28 // returned |MessageLoop| is alive (and will watch handles while it is running).
29 std::unique_ptr<MessageLoop> CreateTestMessageLoopForIO(
30 PlatformHandleWatcher** platform_handle_watcher);
28 31
29 } // namespace test 32 } // namespace test
30 } // namespace platform 33 } // namespace platform
31 } // namespace mojo 34 } // namespace mojo
32 35
33 #endif // MOJO_EDK_PLATFORM_TEST_MESSAGE_LOOPS_H_ 36 #endif // MOJO_EDK_PLATFORM_TEST_MESSAGE_LOOPS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698