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

Side by Side Diff: mojo/edk/base_edk/test_message_loops.cc

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 implements the factory functions declared in 5 // This file implements the factory functions declared in
6 // //mojo/edk/platform/test_message_loops.h (using 6 // //mojo/edk/platform/test_message_loops.h (using
7 // |mojo::platform::MessageLoop|s based on //base, i.e., using 7 // |mojo::platform::MessageLoop|s based on //base, i.e., using
8 // |base_edk::PlatformMessageLoopImpl|). 8 // |base_edk::PlatformMessageLoopImpl|).
9 9
10 #include "mojo/edk/platform/test_message_loops.h" 10 #include "mojo/edk/platform/test_message_loops.h"
11 11
12 #include <utility>
13
12 #include "mojo/edk/base_edk/platform_message_loop_for_io_impl.h" 14 #include "mojo/edk/base_edk/platform_message_loop_for_io_impl.h"
13 #include "mojo/edk/base_edk/platform_message_loop_impl.h" 15 #include "mojo/edk/base_edk/platform_message_loop_impl.h"
14 #include "mojo/edk/util/make_unique.h" 16 #include "mojo/edk/util/make_unique.h"
15 17
16 using mojo::util::MakeUnique; 18 using mojo::util::MakeUnique;
17 19
18 namespace mojo { 20 namespace mojo {
19 namespace platform { 21 namespace platform {
20 namespace test { 22 namespace test {
21 23
22 std::unique_ptr<MessageLoop> CreateTestMessageLoop() { 24 std::unique_ptr<MessageLoop> CreateTestMessageLoop() {
23 return MakeUnique<base_edk::PlatformMessageLoopImpl>(); 25 return MakeUnique<base_edk::PlatformMessageLoopImpl>();
24 } 26 }
25 27
26 std::unique_ptr<MessageLoopForIO> CreateTestMessageLoopForIO() { 28 std::unique_ptr<MessageLoop> CreateTestMessageLoopForIO(
27 return MakeUnique<base_edk::PlatformMessageLoopForIOImpl>(); 29 PlatformHandleWatcher** platform_handle_watcher) {
30 auto rv = MakeUnique<base_edk::PlatformMessageLoopForIOImpl>();
31 *platform_handle_watcher = rv.get();
32 return std::move(rv);
28 } 33 }
29 34
30 } // namespace test 35 } // namespace test
31 } // namespace platform 36 } // namespace platform
32 } // namespace mojo 37 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698