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

Side by Side Diff: examples/native_run_app/native_run_app.cc

Issue 1388413005: Move //mojo/services/X/public/... to //mojo/services/X/... (part 1). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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/native_run_app/BUILD.gn ('k') | examples/pdf_viewer/BUILD.gn » ('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 // This is a terminal client (i.e., a "raw" |mojo.terminal.Terminal| -- e.g., 5 // This is a terminal client (i.e., a "raw" |mojo.terminal.Terminal| -- e.g.,
6 // moterm -- can be asked to talk to this) that prompts the user for a native 6 // moterm -- can be asked to talk to this) that prompts the user for a native
7 // (Linux) binary to run and then does so (via mojo:native_support). 7 // (Linux) binary to run and then does so (via mojo:native_support).
8 // 8 //
9 // E.g., first run mojo:moterm_example_app (embedded by a window manager). Then, 9 // E.g., first run mojo:moterm_example_app (embedded by a window manager). Then,
10 // at the prompt, enter "mojo:native_run_app". At the next prompt, enter "bash" 10 // at the prompt, enter "mojo:native_run_app". At the next prompt, enter "bash"
(...skipping 11 matching lines...) Expand all
22 #include "base/macros.h" 22 #include "base/macros.h"
23 #include "base/strings/string_split.h" 23 #include "base/strings/string_split.h"
24 #include "mojo/application/application_runner_chromium.h" 24 #include "mojo/application/application_runner_chromium.h"
25 #include "mojo/public/c/system/main.h" 25 #include "mojo/public/c/system/main.h"
26 #include "mojo/public/cpp/application/application_connection.h" 26 #include "mojo/public/cpp/application/application_connection.h"
27 #include "mojo/public/cpp/application/application_delegate.h" 27 #include "mojo/public/cpp/application/application_delegate.h"
28 #include "mojo/public/cpp/application/application_impl.h" 28 #include "mojo/public/cpp/application/application_impl.h"
29 #include "mojo/public/cpp/application/interface_factory.h" 29 #include "mojo/public/cpp/application/interface_factory.h"
30 #include "mojo/public/cpp/bindings/interface_request.h" 30 #include "mojo/public/cpp/bindings/interface_request.h"
31 #include "mojo/public/cpp/bindings/strong_binding.h" 31 #include "mojo/public/cpp/bindings/strong_binding.h"
32 #include "mojo/services/files/public/interfaces/files.mojom.h" 32 #include "mojo/services/files/interfaces/files.mojom.h"
33 #include "mojo/services/files/public/interfaces/ioctl.mojom.h" 33 #include "mojo/services/files/interfaces/ioctl.mojom.h"
34 #include "mojo/services/files/public/interfaces/ioctl_terminal.mojom.h" 34 #include "mojo/services/files/interfaces/ioctl_terminal.mojom.h"
35 #include "mojo/services/files/public/interfaces/types.mojom.h" 35 #include "mojo/services/files/interfaces/types.mojom.h"
36 #include "mojo/services/native_support/public/interfaces/process.mojom.h" 36 #include "mojo/services/native_support/public/interfaces/process.mojom.h"
37 #include "mojo/services/terminal/public/interfaces/terminal_client.mojom.h" 37 #include "mojo/services/terminal/public/interfaces/terminal_client.mojom.h"
38 38
39 using mojo::terminal::TerminalClient; 39 using mojo::terminal::TerminalClient;
40 40
41 class TerminalConnection { 41 class TerminalConnection {
42 public: 42 public:
43 explicit TerminalConnection(mojo::files::FilePtr terminal, 43 explicit TerminalConnection(mojo::files::FilePtr terminal,
44 native_support::Process* native_support_process) 44 native_support::Process* native_support_process)
45 : terminal_(terminal.Pass()), 45 : terminal_(terminal.Pass()),
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 mojo::ApplicationImpl* application_impl_; 242 mojo::ApplicationImpl* application_impl_;
243 native_support::ProcessPtr native_support_process_; 243 native_support::ProcessPtr native_support_process_;
244 244
245 DISALLOW_COPY_AND_ASSIGN(NativeRunApp); 245 DISALLOW_COPY_AND_ASSIGN(NativeRunApp);
246 }; 246 };
247 247
248 MojoResult MojoMain(MojoHandle application_request) { 248 MojoResult MojoMain(MojoHandle application_request) {
249 mojo::ApplicationRunnerChromium runner(new NativeRunApp()); 249 mojo::ApplicationRunnerChromium runner(new NativeRunApp());
250 return runner.Run(application_request); 250 return runner.Run(application_request);
251 } 251 }
OLDNEW
« no previous file with comments | « examples/native_run_app/BUILD.gn ('k') | examples/pdf_viewer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698