OLD | NEW |
---|---|
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 #include "base/macros.h" | 5 #include "base/macros.h" |
6 #include "base/run_loop.h" | |
6 #include "build/build_config.h" | 7 #include "build/build_config.h" |
7 #include "ipc/ipc_listener.h" | 8 #include "ipc/ipc_listener.h" |
8 #include "ipc/ipc_sync_channel.h" | 9 #include "ipc/ipc_sync_channel.h" |
9 #include "native_client/src/public/chrome_main.h" | 10 #include "native_client/src/public/chrome_main.h" |
10 #include "native_client/src/untrusted/irt/irt_dev.h" | 11 #include "native_client/src/untrusted/irt/irt_dev.h" |
11 #include "ppapi/nacl_irt/irt_interfaces.h" | 12 #include "ppapi/nacl_irt/irt_interfaces.h" |
12 #include "ppapi/nacl_irt/plugin_startup.h" | 13 #include "ppapi/nacl_irt/plugin_startup.h" |
13 #include "ppapi/proxy/ppapi_messages.h" | 14 #include "ppapi/proxy/ppapi_messages.h" |
14 | 15 |
15 #if !defined(OS_NACL_NONSFI) | 16 #if !defined(OS_NACL_NONSFI) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 Send(reply_msg); | 64 Send(reply_msg); |
64 } | 65 } |
65 | 66 |
66 std::unique_ptr<IPC::Channel> channel_; | 67 std::unique_ptr<IPC::Channel> channel_; |
67 CallbackFunc func_; | 68 CallbackFunc func_; |
68 | 69 |
69 DISALLOW_COPY_AND_ASSIGN(TranslatorLinkListener); | 70 DISALLOW_COPY_AND_ASSIGN(TranslatorLinkListener); |
70 }; | 71 }; |
71 | 72 |
72 void ServeLinkRequest(CallbackFunc func) { | 73 void ServeLinkRequest(CallbackFunc func) { |
73 base::MessageLoop loop; | 74 base::MessageLoop loop; |
bbudge
2016/08/05 19:13:30
Ditto.
fdoray
2016/08/05 23:41:36
Ditto.
| |
74 new TranslatorLinkListener(ppapi::GetRendererIPCChannelHandle(), func); | 75 new TranslatorLinkListener(ppapi::GetRendererIPCChannelHandle(), func); |
75 loop.Run(); | 76 base::RunLoop().Run(); |
76 } | 77 } |
77 | 78 |
78 } | 79 } |
79 | 80 |
80 const struct nacl_irt_private_pnacl_translator_link | 81 const struct nacl_irt_private_pnacl_translator_link |
81 nacl_irt_private_pnacl_translator_link = { | 82 nacl_irt_private_pnacl_translator_link = { |
82 ServeLinkRequest | 83 ServeLinkRequest |
83 }; | 84 }; |
84 | 85 |
85 #endif // !defined(OS_NACL_NONSFI) | 86 #endif // !defined(OS_NACL_NONSFI) |
OLD | NEW |