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

Side by Side Diff: services/shell/tests/lifecycle/app_client.h

Issue 2182643003: Remove shell::Connection* parameter to InterfaceFactory<T>::Create() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 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 #ifndef SERVICES_SHELL_TESTS_LIFECYCLE_APP_CLIENT_H_ 5 #ifndef SERVICES_SHELL_TESTS_LIFECYCLE_APP_CLIENT_H_
6 #define SERVICES_SHELL_TESTS_LIFECYCLE_APP_CLIENT_H_ 6 #define SERVICES_SHELL_TESTS_LIFECYCLE_APP_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 22 matching lines...) Expand all
33 ~AppClient() override; 33 ~AppClient() override;
34 34
35 void set_runner(ServiceRunner* runner) { 35 void set_runner(ServiceRunner* runner) {
36 runner_ = runner; 36 runner_ = runner;
37 } 37 }
38 38
39 // Service: 39 // Service:
40 bool OnConnect(Connection* connection) override; 40 bool OnConnect(Connection* connection) override;
41 41
42 // InterfaceFactory<LifecycleControl>: 42 // InterfaceFactory<LifecycleControl>:
43 void Create(Connection* connection, LifecycleControlRequest request) override; 43 void Create(const Identity& remote_identity,
44 LifecycleControlRequest request) override;
44 45
45 // LifecycleControl: 46 // LifecycleControl:
46 void Ping(const PingCallback& callback) override; 47 void Ping(const PingCallback& callback) override;
47 void GracefulQuit() override; 48 void GracefulQuit() override;
48 void Crash() override; 49 void Crash() override;
49 void CloseShellConnection() override; 50 void CloseShellConnection() override;
50 51
51 private: 52 private:
52 void BindingLost(); 53 void BindingLost();
53 54
54 ServiceRunner* runner_ = nullptr; 55 ServiceRunner* runner_ = nullptr;
55 mojo::BindingSet<LifecycleControl> bindings_; 56 mojo::BindingSet<LifecycleControl> bindings_;
56 std::unique_ptr<ServiceContext> context_; 57 std::unique_ptr<ServiceContext> context_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(AppClient); 59 DISALLOW_COPY_AND_ASSIGN(AppClient);
59 }; 60 };
60 61
61 } // namespace test 62 } // namespace test
62 } // namespace shell 63 } // namespace shell
63 64
64 #endif // SERVICES_SHELL_TESTS_LIFECYCLE_APP_CLIENT_H_ 65 #endif // SERVICES_SHELL_TESTS_LIFECYCLE_APP_CLIENT_H_
OLDNEW
« no previous file with comments | « services/shell/tests/connect/connect_unittest.cc ('k') | services/shell/tests/lifecycle/app_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698