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

Side by Side Diff: mojo/examples/html_viewer/html_viewer.cc

Issue 336313007: Mojo: Rename MOJO_WAIT_FLAG_... -> MOJO_HANDLE_SIGNAL_.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 6 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/embedder/embedder_unittest.cc ('k') | mojo/examples/image_viewer/image_viewer.cc » ('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/cpp/application/application.h" 5 #include "mojo/public/cpp/application/application.h"
6 #include "mojo/services/public/cpp/view_manager/node.h" 6 #include "mojo/services/public/cpp/view_manager/node.h"
7 #include "mojo/services/public/cpp/view_manager/types.h" 7 #include "mojo/services/public/cpp/view_manager/types.h"
8 #include "mojo/services/public/cpp/view_manager/view.h" 8 #include "mojo/services/public/cpp/view_manager/view.h"
9 #include "mojo/services/public/cpp/view_manager/view_manager.h" 9 #include "mojo/services/public/cpp/view_manager/view_manager.h"
10 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h" 10 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
(...skipping 20 matching lines...) Expand all
31 for (;;) { 31 for (;;) {
32 char buf[512]; 32 char buf[512];
33 uint32_t num_bytes = sizeof(buf); 33 uint32_t num_bytes = sizeof(buf);
34 MojoResult result = ReadDataRaw( 34 MojoResult result = ReadDataRaw(
35 response_body_stream.get(), 35 response_body_stream.get(),
36 buf, 36 buf,
37 &num_bytes, 37 &num_bytes,
38 MOJO_READ_DATA_FLAG_NONE); 38 MOJO_READ_DATA_FLAG_NONE);
39 if (result == MOJO_RESULT_SHOULD_WAIT) { 39 if (result == MOJO_RESULT_SHOULD_WAIT) {
40 Wait(response_body_stream.get(), 40 Wait(response_body_stream.get(),
41 MOJO_WAIT_FLAG_READABLE, 41 MOJO_HANDLE_SIGNAL_READABLE,
42 MOJO_DEADLINE_INDEFINITE); 42 MOJO_DEADLINE_INDEFINITE);
43 } else if (result == MOJO_RESULT_OK) { 43 } else if (result == MOJO_RESULT_OK) {
44 fwrite(buf, num_bytes, 1, stdout); 44 fwrite(buf, num_bytes, 1, stdout);
45 } else { 45 } else {
46 break; 46 break;
47 } 47 }
48 } 48 }
49 printf("\n>>>> EOF <<<<\n\n"); 49 printf("\n>>>> EOF <<<<\n\n");
50 50
51 UpdateView(); 51 UpdateView();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 } 93 }
94 94
95 // static 95 // static
96 Application* Application::Create() { 96 Application* Application::Create() {
97 return new examples::HTMLViewer; 97 return new examples::HTMLViewer;
98 } 98 }
99 99
100 } 100 }
OLDNEW
« no previous file with comments | « mojo/embedder/embedder_unittest.cc ('k') | mojo/examples/image_viewer/image_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698