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

Side by Side Diff: services/shell/public/cpp/connector.h

Issue 2111353002: Move content's shell connections to the IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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/shell/public/cpp/connection.h ('k') | services/shell/public/cpp/interface_provider.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 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_PUBLIC_CPP_CONNECTOR_H_ 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_
6 #define SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_ 6 #define SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "services/shell/public/cpp/connection.h" 10 #include "services/shell/public/cpp/connection.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 private: 65 private:
66 Identity target_; 66 Identity target_;
67 mojom::ServicePtr service_; 67 mojom::ServicePtr service_;
68 mojom::PIDReceiverRequest pid_receiver_request_; 68 mojom::PIDReceiverRequest pid_receiver_request_;
69 InterfaceRegistry* exposed_interfaces_ = nullptr; 69 InterfaceRegistry* exposed_interfaces_ = nullptr;
70 InterfaceProvider* remote_interfaces_ = nullptr; 70 InterfaceProvider* remote_interfaces_ = nullptr;
71 71
72 DISALLOW_COPY_AND_ASSIGN(ConnectParams); 72 DISALLOW_COPY_AND_ASSIGN(ConnectParams);
73 }; 73 };
74 74
75 // Creates a new Connector instance and fills in |*request| with a request
76 // for the other end the Connector's interface.
77 static std::unique_ptr<Connector> Create(mojom::ConnectorRequest* request);
78
75 // Requests a new connection to an application. Returns a pointer to the 79 // Requests a new connection to an application. Returns a pointer to the
76 // connection if the connection is permitted by this application's delegate, 80 // connection if the connection is permitted by this application's delegate,
77 // or nullptr otherwise. Caller takes ownership. 81 // or nullptr otherwise. Caller takes ownership.
78 // Once this method is called, this object is bound to the thread on which the 82 // Once this method is called, this object is bound to the thread on which the
79 // call took place. To pass to another thread, call Clone() and pass the 83 // call took place. To pass to another thread, call Clone() and pass the
80 // result. 84 // result.
81 virtual std::unique_ptr<Connection> Connect(const std::string& name) = 0; 85 virtual std::unique_ptr<Connection> Connect(const std::string& name) = 0;
82 virtual std::unique_ptr<Connection> Connect(ConnectParams* params) = 0; 86 virtual std::unique_ptr<Connection> Connect(ConnectParams* params) = 0;
83 87
84 // Connect to application identified by |request->name| and connect to the 88 // Connect to application identified by |request->name| and connect to the
(...skipping 20 matching lines...) Expand all
105 109
106 // Creates a new instance of this class which may be passed to another thread. 110 // Creates a new instance of this class which may be passed to another thread.
107 // The returned object may be passed multiple times until Connect() is called, 111 // The returned object may be passed multiple times until Connect() is called,
108 // at which point this method must be called again to pass again. 112 // at which point this method must be called again to pass again.
109 virtual std::unique_ptr<Connector> Clone() = 0; 113 virtual std::unique_ptr<Connector> Clone() = 0;
110 }; 114 };
111 115
112 } // namespace shell 116 } // namespace shell
113 117
114 #endif // SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_ 118 #endif // SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_
OLDNEW
« no previous file with comments | « services/shell/public/cpp/connection.h ('k') | services/shell/public/cpp/interface_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698