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

Side by Side Diff: mojo/shell/runner/child/native_apptest_target.cc

Issue 1681813002: Rename Connection::AddService/ConnectToService to Connection::AddInterface/GetInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface_binder
Patch Set: . Created 4 years, 10 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 | « mojo/shell/public/cpp/shell.h ('k') | mojo/shell/shell_application_delegate.cc » ('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 <utility> 5 #include <utility>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "mojo/common/weak_binding_set.h" 10 #include "mojo/common/weak_binding_set.h"
(...skipping 13 matching lines...) Expand all
24 public mojo::InterfaceFactory<mojo::shell::test::TestNativeService> { 24 public mojo::InterfaceFactory<mojo::shell::test::TestNativeService> {
25 public: 25 public:
26 TargetApplicationDelegate() {} 26 TargetApplicationDelegate() {}
27 ~TargetApplicationDelegate() override {} 27 ~TargetApplicationDelegate() override {}
28 28
29 private: 29 private:
30 // mojo::ShellClient: 30 // mojo::ShellClient:
31 void Initialize(mojo::Shell* shell, const std::string& url, 31 void Initialize(mojo::Shell* shell, const std::string& url,
32 uint32_t id) override {} 32 uint32_t id) override {}
33 bool AcceptConnection(mojo::Connection* connection) override { 33 bool AcceptConnection(mojo::Connection* connection) override {
34 connection->AddService<mojo::shell::test::TestNativeService>(this); 34 connection->AddInterface<mojo::shell::test::TestNativeService>(this);
35 return true; 35 return true;
36 } 36 }
37 37
38 // mojo::shell::test::TestNativeService: 38 // mojo::shell::test::TestNativeService:
39 void Invert(bool from_driver, const InvertCallback& callback) override { 39 void Invert(bool from_driver, const InvertCallback& callback) override {
40 callback.Run(!from_driver); 40 callback.Run(!from_driver);
41 } 41 }
42 42
43 // mojo::InterfaceFactory<mojo::shell::test::TestNativeService>: 43 // mojo::InterfaceFactory<mojo::shell::test::TestNativeService>:
44 void Create(mojo::Connection* connection, 44 void Create(mojo::Connection* connection,
(...skipping 11 matching lines...) Expand all
56 56
57 int main(int argc, char** argv) { 57 int main(int argc, char** argv) {
58 base::AtExitManager at_exit; 58 base::AtExitManager at_exit;
59 base::CommandLine::Init(argc, argv); 59 base::CommandLine::Init(argc, argv);
60 60
61 mojo::shell::InitializeLogging(); 61 mojo::shell::InitializeLogging();
62 62
63 TargetApplicationDelegate delegate; 63 TargetApplicationDelegate delegate;
64 return mojo::shell::TestNativeMain(&delegate); 64 return mojo::shell::TestNativeMain(&delegate);
65 } 65 }
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/shell.h ('k') | mojo/shell/shell_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698