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

Side by Side Diff: services/keyboard/linux/main.cc

Issue 1975993002: Change InterfaceFactory<I>::Create() to take a ConnectionContext instead of an ApplicationConnectio… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 | « services/icu_data/icu_data_impl.cc ('k') | services/log/log_impl.h » ('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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/threading/sequenced_worker_pool.h" 6 #include "base/threading/sequenced_worker_pool.h"
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/application/application_delegate.h" 10 #include "mojo/public/cpp/application/application_delegate.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 private: 45 private:
46 46
47 // |ApplicationDelegate| override: 47 // |ApplicationDelegate| override:
48 bool ConfigureIncomingConnection( 48 bool ConfigureIncomingConnection(
49 mojo::ApplicationConnection* connection) override { 49 mojo::ApplicationConnection* connection) override {
50 connection->AddService<KeyboardServiceFactory>(this); 50 connection->AddService<KeyboardServiceFactory>(this);
51 return true; 51 return true;
52 } 52 }
53 53
54 // |InterfaceFactory<KeyboardService>| implementation: 54 // |InterfaceFactory<KeyboardService>| implementation:
55 void Create( 55 void Create(const mojo::ConnectionContext& connection_context,
56 mojo::ApplicationConnection* connection, 56 mojo::InterfaceRequest<KeyboardServiceFactory> request) override {
57 mojo::InterfaceRequest<KeyboardServiceFactory> request) override {
58 new KeyboardServiceFactoryImpl(request.Pass()); 57 new KeyboardServiceFactoryImpl(request.Pass());
59 } 58 }
60 59
61 private: 60 private:
62 61
63 DISALLOW_COPY_AND_ASSIGN(KeyboardServiceApp); 62 DISALLOW_COPY_AND_ASSIGN(KeyboardServiceApp);
64 }; 63 };
65 64
66 } // namespace keyboard 65 } // namespace keyboard
67 66
68 MojoResult MojoMain(MojoHandle application_request) { 67 MojoResult MojoMain(MojoHandle application_request) {
69 mojo::ApplicationRunnerChromium runner( 68 mojo::ApplicationRunnerChromium runner(
70 new keyboard::KeyboardServiceApp()); 69 new keyboard::KeyboardServiceApp());
71 return runner.Run(application_request); 70 return runner.Run(application_request);
72 } 71 }
OLDNEW
« no previous file with comments | « services/icu_data/icu_data_impl.cc ('k') | services/log/log_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698