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

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

Issue 2011383002: Get rid of {Run,Terminate}MainApplication(), and more ApplicationDelegate conversion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 4 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
« no previous file with comments | « examples/echo/echo_server.cc ('k') | examples/hello_mojo/hello_mojo_client.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 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/common/binding_set.h" 11 #include "mojo/common/binding_set.h"
12 #include "mojo/environment/scoped_chromium_init.h"
12 #include "mojo/public/c/system/main.h" 13 #include "mojo/public/c/system/main.h"
13 #include "mojo/public/cpp/application/application_impl_base.h" 14 #include "mojo/public/cpp/application/application_impl_base.h"
14 #include "mojo/public/cpp/application/run_application.h" 15 #include "mojo/public/cpp/application/run_application.h"
15 #include "mojo/public/cpp/application/service_provider_impl.h" 16 #include "mojo/public/cpp/application/service_provider_impl.h"
16 #include "mojo/services/files/interfaces/file.mojom.h" 17 #include "mojo/services/files/interfaces/file.mojom.h"
17 #include "mojo/services/files/interfaces/types.mojom.h" 18 #include "mojo/services/files/interfaces/types.mojom.h"
18 #include "mojo/services/terminal/interfaces/terminal_client.mojom.h" 19 #include "mojo/services/terminal/interfaces/terminal_client.mojom.h"
19 20
20 const uint32_t kMaxBytesToRead = 1000; 21 const uint32_t kMaxBytesToRead = 1000;
21 22
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 (new TerminalEchoer(mojo::files::FilePtr::Create(std::move(terminal)))) 123 (new TerminalEchoer(mojo::files::FilePtr::Create(std::move(terminal))))
123 ->StartReading(); 124 ->StartReading();
124 } 125 }
125 126
126 mojo::BindingSet<mojo::terminal::TerminalClient> terminal_clients_; 127 mojo::BindingSet<mojo::terminal::TerminalClient> terminal_clients_;
127 128
128 DISALLOW_COPY_AND_ASSIGN(EchoTerminalApp); 129 DISALLOW_COPY_AND_ASSIGN(EchoTerminalApp);
129 }; 130 };
130 131
131 MojoResult MojoMain(MojoHandle application_request) { 132 MojoResult MojoMain(MojoHandle application_request) {
133 mojo::ScopedChromiumInit init;
132 EchoTerminalApp echo_terminal_app; 134 EchoTerminalApp echo_terminal_app;
133 return mojo::RunMainApplication(application_request, &echo_terminal_app); 135 return mojo::RunApplication(application_request, &echo_terminal_app);
134 } 136 }
OLDNEW
« no previous file with comments | « examples/echo/echo_server.cc ('k') | examples/hello_mojo/hello_mojo_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698