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

Side by Side Diff: services/fake_surfaces/fake_surfaces_service_application.cc

Issue 943053003: Simple multi-url support for mojo apps (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: hate Created 5 years, 9 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 "services/fake_surfaces/fake_surfaces_service_application.h" 5 #include "services/fake_surfaces/fake_surfaces_service_application.h"
6 6
7 #include "mojo/application/application_runner_chromium.h" 7 #include "mojo/application/application_runner_chromium.h"
8 #include "mojo/public/c/system/main.h" 8 #include "mojo/public/c/system/main.h"
9 #include "mojo/public/cpp/application/application_connection.h" 9 #include "mojo/public/cpp/application/application_connection.h"
10 #include "mojo/public/cpp/bindings/strong_binding.h" 10 #include "mojo/public/cpp/bindings/strong_binding.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 FakeSurfacesServiceApplication::~FakeSurfacesServiceApplication() { 76 FakeSurfacesServiceApplication::~FakeSurfacesServiceApplication() {
77 } 77 }
78 78
79 void FakeSurfacesServiceApplication::Initialize(mojo::ApplicationImpl* app) { 79 void FakeSurfacesServiceApplication::Initialize(mojo::ApplicationImpl* app) {
80 tracing_.Initialize(app); 80 tracing_.Initialize(app);
81 } 81 }
82 82
83 bool FakeSurfacesServiceApplication::ConfigureIncomingConnection( 83 bool FakeSurfacesServiceApplication::ConfigureIncomingConnection(
84 mojo::ApplicationConnection* connection) { 84 mojo::ApplicationConnection* connection,
85 const std::string& url) {
85 connection->AddService(this); 86 connection->AddService(this);
86 return true; 87 return true;
87 } 88 }
88 89
89 void FakeSurfacesServiceApplication::Create( 90 void FakeSurfacesServiceApplication::Create(
90 mojo::ApplicationConnection* connection, 91 mojo::ApplicationConnection* connection,
91 InterfaceRequest<mojo::Surface> request) { 92 InterfaceRequest<mojo::Surface> request) {
92 new FakeSurfaceImpl(next_id_namespace_++, request.Pass()); 93 new FakeSurfaceImpl(next_id_namespace_++, request.Pass());
93 } 94 }
94 95
95 } // namespace fake_surfaces 96 } // namespace fake_surfaces
96 97
97 MojoResult MojoMain(MojoHandle shell_handle) { 98 MojoResult MojoMain(MojoHandle shell_handle) {
98 mojo::ApplicationRunnerChromium runner( 99 mojo::ApplicationRunnerChromium runner(
99 new fake_surfaces::FakeSurfacesServiceApplication); 100 new fake_surfaces::FakeSurfacesServiceApplication);
100 return runner.Run(shell_handle); 101 return runner.Run(shell_handle);
101 } 102 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698