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

Side by Side Diff: mojo/public/bindings/lib/sync_dispatcher.cc

Issue 218613010: Mojo: Move mojo/public/bindings/*.h to mojo/public/cpp/bindings/*.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « mojo/public/bindings/lib/scratch_buffer.h ('k') | mojo/public/bindings/message.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/public/bindings/sync_dispatcher.h" 5 #include "mojo/public/cpp/bindings/sync_dispatcher.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "mojo/public/bindings/message.h" 9 #include "mojo/public/cpp/bindings/message.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 12
13 bool WaitForMessageAndDispatch(MessagePipeHandle handle, 13 bool WaitForMessageAndDispatch(MessagePipeHandle handle,
14 MessageReceiver* receiver) { 14 MessageReceiver* receiver) {
15 while (true) { 15 while (true) {
16 bool result; 16 bool result;
17 MojoResult rv = ReadAndDispatchMessage(handle, receiver, &result); 17 MojoResult rv = ReadAndDispatchMessage(handle, receiver, &result);
18 if (rv == MOJO_RESULT_OK) 18 if (rv == MOJO_RESULT_OK)
19 return result; 19 return result;
20 if (rv == MOJO_RESULT_SHOULD_WAIT) 20 if (rv == MOJO_RESULT_SHOULD_WAIT)
21 rv = Wait(handle, MOJO_WAIT_FLAG_READABLE, MOJO_DEADLINE_INDEFINITE); 21 rv = Wait(handle, MOJO_WAIT_FLAG_READABLE, MOJO_DEADLINE_INDEFINITE);
22 if (rv != MOJO_RESULT_OK) 22 if (rv != MOJO_RESULT_OK)
23 return false; 23 return false;
24 } 24 }
25 } 25 }
26 26
27 } // namespace mojo 27 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/bindings/lib/scratch_buffer.h ('k') | mojo/public/bindings/message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698