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

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

Issue 793243002: Restructure public side of content_handler service. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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/content_handler_demo/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 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "mojo/public/c/system/main.h" 7 #include "mojo/public/c/system/main.h"
8 #include "mojo/public/cpp/application/application_delegate.h" 8 #include "mojo/public/cpp/application/application_delegate.h"
9 #include "mojo/public/cpp/application/application_impl.h" 9 #include "mojo/public/cpp/application/application_impl.h"
10 #include "mojo/public/cpp/application/application_runner.h" 10 #include "mojo/public/cpp/application/application_runner.h"
11 #include "mojo/public/cpp/application/interface_factory_impl.h" 11 #include "mojo/public/cpp/application/interface_factory_impl.h"
12 #include "mojo/services/public/interfaces/content_handler/content_handler.mojom. h" 12 #include "mojo/services/content_handler/public/interfaces/content_handler.mojom. h"
13 13
14 namespace mojo { 14 namespace mojo {
15 namespace examples { 15 namespace examples {
16 16
17 class PrintBodyApplication : public InterfaceImpl<Application> { 17 class PrintBodyApplication : public InterfaceImpl<Application> {
18 public: 18 public:
19 PrintBodyApplication(ShellPtr shell, ScopedDataPipeConsumerHandle body) 19 PrintBodyApplication(ShellPtr shell, ScopedDataPipeConsumerHandle body)
20 : shell_(shell.Pass()), body_(body.Pass()) { 20 : shell_(shell.Pass()), body_(body.Pass()) {
21 shell_.set_client(this); 21 shell_.set_client(this);
22 } 22 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 MOJO_DISALLOW_COPY_AND_ASSIGN(ContentHandlerApp); 92 MOJO_DISALLOW_COPY_AND_ASSIGN(ContentHandlerApp);
93 }; 93 };
94 94
95 } // namespace examples 95 } // namespace examples
96 } // namespace mojo 96 } // namespace mojo
97 97
98 MojoResult MojoMain(MojoHandle shell_handle) { 98 MojoResult MojoMain(MojoHandle shell_handle) {
99 mojo::ApplicationRunner runner(new mojo::examples::ContentHandlerApp); 99 mojo::ApplicationRunner runner(new mojo::examples::ContentHandlerApp);
100 return runner.Run(shell_handle); 100 return runner.Run(shell_handle);
101 } 101 }
OLDNEW
« no previous file with comments | « examples/content_handler_demo/BUILD.gn ('k') | examples/pdf_viewer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698