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

Unified Diff: mojo/service_manager/service_manager.h

Issue 225203002: Mojo Spy core first cut (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gcc fix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/service_manager/service_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/service_manager/service_manager.h
diff --git a/mojo/service_manager/service_manager.h b/mojo/service_manager/service_manager.h
index f2ee988960fec903c0be4634222373d19b49c3cb..6d9ab5de0d821673e530d060a12b5571ae00ca1a 100644
--- a/mojo/service_manager/service_manager.h
+++ b/mojo/service_manager/service_manager.h
@@ -39,6 +39,15 @@ class MOJO_SERVICE_MANAGER_EXPORT ServiceManager {
ServiceManager* manager_;
};
+ // Interface class for debugging only.
+ class Interceptor {
+ public:
+ virtual ~Interceptor() {}
+ // Called when ServiceManager::Connect is called.
+ virtual ScopedMessagePipeHandle OnConnectToClient(
+ const GURL& url, ScopedMessagePipeHandle handle) = 0;
+ };
+
ServiceManager();
~ServiceManager();
@@ -58,6 +67,8 @@ class MOJO_SERVICE_MANAGER_EXPORT ServiceManager {
// Sets a Loader to be used for a specific url scheme.
// Does not take ownership of |loader|.
void SetLoaderForScheme(ServiceLoader* loader, const std::string& scheme);
+ // Allows to interpose a debugger to service connections.
+ void SetInterceptor(Interceptor* interceptor);
private:
class ServiceFactory;
@@ -77,6 +88,7 @@ class MOJO_SERVICE_MANAGER_EXPORT ServiceManager {
URLToLoaderMap url_to_loader_;
SchemeToLoaderMap scheme_to_loader_;
ServiceLoader* default_loader_;
+ Interceptor* interceptor_;
URLToServiceFactoryMap url_to_service_factory_;
DISALLOW_COPY_AND_ASSIGN(ServiceManager);
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/service_manager/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698