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

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

Issue 2034383003: Removed exposed_services from mojom definitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
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 <utility> 7 #include <utility>
8 8
9 #include "mojo/public/c/system/main.h" 9 #include "mojo/public/c/system/main.h"
10 #include "mojo/public/cpp/application/application_impl_base.h" 10 #include "mojo/public/cpp/application/application_impl_base.h"
(...skipping 13 matching lines...) Expand all
24 : binding_(this, request.Pass()), body_(body.Pass()) {} 24 : binding_(this, request.Pass()), body_(body.Pass()) {}
25 25
26 void Initialize(InterfaceHandle<Shell> shell, 26 void Initialize(InterfaceHandle<Shell> shell,
27 Array<String> args, 27 Array<String> args,
28 const mojo::String& url) override { 28 const mojo::String& url) override {
29 shell_ = ShellPtr::Create(std::move(shell)); 29 shell_ = ShellPtr::Create(std::move(shell));
30 } 30 }
31 void RequestQuit() override {} 31 void RequestQuit() override {}
32 32
33 void AcceptConnection(const String& requestor_url, 33 void AcceptConnection(const String& requestor_url,
34 InterfaceRequest<ServiceProvider> services, 34 const String& url,
35 InterfaceHandle<ServiceProvider> exported_services, 35 InterfaceRequest<ServiceProvider> services) override {
36 const String& url) override {
37 printf( 36 printf(
38 "ContentHandler::OnConnect - url:%s - requestor_url:%s - body " 37 "ContentHandler::OnConnect - url:%s - requestor_url:%s - body "
39 "follows\n\n", 38 "follows\n\n",
40 url.To<std::string>().c_str(), requestor_url.To<std::string>().c_str()); 39 url.To<std::string>().c_str(), requestor_url.To<std::string>().c_str());
41 PrintResponse(body_.Pass()); 40 PrintResponse(body_.Pass());
42 delete this; 41 delete this;
43 } 42 }
44 43
45 private: 44 private:
46 void PrintResponse(ScopedDataPipeConsumerHandle body) const { 45 void PrintResponse(ScopedDataPipeConsumerHandle body) const {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 MOJO_DISALLOW_COPY_AND_ASSIGN(ContentHandlerApp); 108 MOJO_DISALLOW_COPY_AND_ASSIGN(ContentHandlerApp);
110 }; 109 };
111 110
112 } // namespace examples 111 } // namespace examples
113 } // namespace mojo 112 } // namespace mojo
114 113
115 MojoResult MojoMain(MojoHandle application_request) { 114 MojoResult MojoMain(MojoHandle application_request) {
116 mojo::examples::ContentHandlerApp content_handler_app; 115 mojo::examples::ContentHandlerApp content_handler_app;
117 return mojo::RunApplication(application_request, &content_handler_app); 116 return mojo::RunApplication(application_request, &content_handler_app);
118 } 117 }
OLDNEW
« no previous file with comments | « apps/benchmark/benchmark_app.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