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

Side by Side Diff: examples/echo_terminal/main.cc

Issue 1977023003: ApplicationConnection devolution, part 4 (the end). (Closed) Base URL: https://github.com/domokit/mojo.git@work790_app_conn_devo_3.1
Patch Set: Created 4 years, 7 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
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 #include <utility> 5 #include <utility>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "mojo/application/application_runner_chromium.h" 11 #include "mojo/application/application_runner_chromium.h"
12 #include "mojo/common/binding_set.h" 12 #include "mojo/common/binding_set.h"
13 #include "mojo/public/c/system/main.h" 13 #include "mojo/public/c/system/main.h"
14 #include "mojo/public/cpp/application/application_connection.h"
15 #include "mojo/public/cpp/application/application_delegate.h" 14 #include "mojo/public/cpp/application/application_delegate.h"
15 #include "mojo/public/cpp/application/service_provider_impl.h"
16 #include "mojo/services/files/interfaces/file.mojom.h" 16 #include "mojo/services/files/interfaces/file.mojom.h"
17 #include "mojo/services/files/interfaces/types.mojom.h" 17 #include "mojo/services/files/interfaces/types.mojom.h"
18 #include "mojo/services/terminal/interfaces/terminal_client.mojom.h" 18 #include "mojo/services/terminal/interfaces/terminal_client.mojom.h"
19 19
20 const uint32_t kMaxBytesToRead = 1000; 20 const uint32_t kMaxBytesToRead = 1000;
21 21
22 // Owns itself. 22 // Owns itself.
23 class TerminalEchoer { 23 class TerminalEchoer {
24 public: 24 public:
25 explicit TerminalEchoer(mojo::files::FilePtr terminal) 25 explicit TerminalEchoer(mojo::files::FilePtr terminal)
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 mojo::BindingSet<mojo::terminal::TerminalClient> terminal_clients_; 127 mojo::BindingSet<mojo::terminal::TerminalClient> terminal_clients_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(EchoTerminalApp); 129 DISALLOW_COPY_AND_ASSIGN(EchoTerminalApp);
130 }; 130 };
131 131
132 MojoResult MojoMain(MojoHandle application_request) { 132 MojoResult MojoMain(MojoHandle application_request) {
133 mojo::ApplicationRunnerChromium runner(new EchoTerminalApp()); 133 mojo::ApplicationRunnerChromium runner(new EchoTerminalApp());
134 return runner.Run(application_request); 134 return runner.Run(application_request);
135 } 135 }
OLDNEW
« no previous file with comments | « examples/echo/echo_server.cc ('k') | examples/forwarding_content_handler/forwarding_content_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698