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

Side by Side Diff: mojo/shell/background/tests/test_service.cc

Issue 1735583002: Rename WeakBindingSet/WeakInterfacePtrSet to BindingSet/InterfacePtrSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « mojo/shell/application_manager.h ('k') | mojo/shell/runner/child/native_apptest_target.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "mojo/public/c/system/main.h" 5 #include "mojo/public/c/system/main.h"
6 #include "mojo/public/cpp/bindings/weak_binding_set.h" 6 #include "mojo/public/cpp/bindings/binding_set.h"
7 #include "mojo/shell/background/tests/test.mojom.h" 7 #include "mojo/shell/background/tests/test.mojom.h"
8 #include "mojo/shell/public/cpp/application_runner.h" 8 #include "mojo/shell/public/cpp/application_runner.h"
9 #include "mojo/shell/public/cpp/connection.h" 9 #include "mojo/shell/public/cpp/connection.h"
10 #include "mojo/shell/public/cpp/shell_client.h" 10 #include "mojo/shell/public/cpp/shell_client.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 namespace shell { 13 namespace shell {
14 14
15 class TestClient : public ShellClient, 15 class TestClient : public ShellClient,
16 public InterfaceFactory<mojom::TestService>, 16 public InterfaceFactory<mojom::TestService>,
(...skipping 15 matching lines...) Expand all
32 32
33 // InterfaceFactory<mojom::TestService>: 33 // InterfaceFactory<mojom::TestService>:
34 void Create(Connection* connection, 34 void Create(Connection* connection,
35 InterfaceRequest<mojom::TestService> request) override { 35 InterfaceRequest<mojom::TestService> request) override {
36 bindings_.AddBinding(this, std::move(request)); 36 bindings_.AddBinding(this, std::move(request));
37 } 37 }
38 38
39 // mojom::TestService 39 // mojom::TestService
40 void Test(const TestCallback& callback) override { callback.Run(); } 40 void Test(const TestCallback& callback) override { callback.Run(); }
41 41
42 WeakBindingSet<mojom::TestService> bindings_; 42 BindingSet<mojom::TestService> bindings_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(TestClient); 44 DISALLOW_COPY_AND_ASSIGN(TestClient);
45 }; 45 };
46 46
47 } // namespace shell 47 } // namespace shell
48 } // namespace mojo 48 } // namespace mojo
49 49
50 MojoResult MojoMain(MojoHandle shell_handle) { 50 MojoResult MojoMain(MojoHandle shell_handle) {
51 mojo::ApplicationRunner runner(new mojo::shell::TestClient); 51 mojo::ApplicationRunner runner(new mojo::shell::TestClient);
52 return runner.Run(shell_handle); 52 return runner.Run(shell_handle);
53 } 53 }
OLDNEW
« no previous file with comments | « mojo/shell/application_manager.h ('k') | mojo/shell/runner/child/native_apptest_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698