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

Side by Side Diff: content/public/common/service_manager_connection.h

Issue 2766263009: Convert content ConnectionFilter to OnBindInterface (Closed)
Patch Set: . Created 3 years, 8 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 CONTENT_PUBLIC_COMMON_SERVICE_MANAGER_CONNECTION_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_SERVICE_MANAGER_CONNECTION_H_
6 #define CONTENT_PUBLIC_COMMON_SERVICE_MANAGER_CONNECTION_H_ 6 #define CONTENT_PUBLIC_COMMON_SERVICE_MANAGER_CONNECTION_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Begins accepting incoming connections. Connection filters MUST be added 75 // Begins accepting incoming connections. Connection filters MUST be added
76 // before calling this in order to avoid races. See AddConnectionFilter() 76 // before calling this in order to avoid races. See AddConnectionFilter()
77 // below. 77 // below.
78 virtual void Start() = 0; 78 virtual void Start() = 0;
79 79
80 // Returns the service_manager::Connector received via this connection's 80 // Returns the service_manager::Connector received via this connection's
81 // Service 81 // Service
82 // implementation. Use this to initiate connections as this object's Identity. 82 // implementation. Use this to initiate connections as this object's Identity.
83 virtual service_manager::Connector* GetConnector() = 0; 83 virtual service_manager::Connector* GetConnector() = 0;
84 84
85 // Returns this connection's identity with the Service Manager. Connections 85 // Returns the service_manager::ServiceInfo for the current service and the
86 // initiated via the service_manager::Connector returned by GetConnector() 86 // browser service (if this is not the browser service).
87 // will use 87 virtual const service_manager::ServiceInfo& GetLocalInfo() const = 0;
88 // this. 88 virtual const service_manager::ServiceInfo& GetBrowserInfo() const = 0;
89 virtual const service_manager::Identity& GetIdentity() const = 0;
90 89
91 // Sets a closure that is called when the connection is lost. Note that 90 // Sets a closure that is called when the connection is lost. Note that
92 // connection may already have been closed, in which case |closure| will be 91 // connection may already have been closed, in which case |closure| will be
93 // run immediately before returning from this function. 92 // run immediately before returning from this function.
94 virtual void SetConnectionLostClosure(const base::Closure& closure) = 0; 93 virtual void SetConnectionLostClosure(const base::Closure& closure) = 0;
95 94
96 // Provides an InterfaceRegistry to forward incoming interface requests to 95 // Provides an InterfaceRegistry to forward incoming interface requests to
97 // on the ServiceManagerConnection's own thread if they aren't bound by the 96 // on the ServiceManagerConnection's own thread if they aren't bound by the
98 // connection's internal InterfaceRegistry on the IO thread. 97 // connection's internal InterfaceRegistry on the IO thread.
99 // 98 //
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Registers a callback to be run when the service_manager::Service 146 // Registers a callback to be run when the service_manager::Service
148 // implementation on the IO thread receives OnConnect(). Returns an id that 147 // implementation on the IO thread receives OnConnect(). Returns an id that
149 // can be passed to RemoveOnConnectHandler(), starting at 1. 148 // can be passed to RemoveOnConnectHandler(), starting at 1.
150 virtual int AddOnConnectHandler(const OnConnectHandler& handler) = 0; 149 virtual int AddOnConnectHandler(const OnConnectHandler& handler) = 0;
151 virtual void RemoveOnConnectHandler(int id) = 0; 150 virtual void RemoveOnConnectHandler(int id) = 0;
152 }; 151 };
153 152
154 } // namespace content 153 } // namespace content
155 154
156 #endif // CONTENT_PUBLIC_COMMON_SERVICE_MANAGER_CONNECTION_H_ 155 #endif // CONTENT_PUBLIC_COMMON_SERVICE_MANAGER_CONNECTION_H_
OLDNEW
« no previous file with comments | « content/public/common/connection_filter.h ('k') | content/public/test/mock_render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698