Index: mojo/shell/dynamic_service_loader.h |
diff --git a/mojo/shell/dynamic_service_loader.h b/mojo/shell/dynamic_service_loader.h |
index 72bf093e56e093809a83cd8d3a934f904cf12bca..4c3445dff0d601217e9f73cecf1e176c81e786cc 100644 |
--- a/mojo/shell/dynamic_service_loader.h |
+++ b/mojo/shell/dynamic_service_loader.h |
@@ -8,6 +8,7 @@ |
#include <map> |
#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
#include "mojo/public/cpp/system/core.h" |
#include "mojo/service_manager/service_loader.h" |
#include "mojo/services/public/interfaces/network/network_service.mojom.h" |
@@ -30,17 +31,38 @@ class DynamicServiceLoader : public ServiceLoader { |
scoped_ptr<DynamicServiceRunnerFactory> runner_factory); |
virtual ~DynamicServiceLoader(); |
+ void set_content_handler(const std::string& mime_type, |
+ const GURL& content_handler_url); |
DaveMoore
2014/08/06 20:50:46
SetContentHandlerURL() or SetContentHandlerURLForM
Aaron Boodman
2014/08/06 22:49:29
I looked at doing this, but it makes ownership of
|
+ |
// ServiceLoader methods: |
- virtual void LoadService(ServiceManager* manager, |
- const GURL& url, |
- ScopedMessagePipeHandle service_handle) OVERRIDE; |
+ virtual void LoadService( |
+ ServiceManager* manager, |
+ const GURL& url, |
+ scoped_refptr<LoadServiceCallbacks> callbacks) OVERRIDE; |
virtual void OnServiceError(ServiceManager* manager, const GURL& url) |
OVERRIDE; |
private: |
+ typedef std::map<std::string, GURL> MimeTypeToURLMap; |
+ |
+ void LoadLocalService(const GURL& resolved_url, |
+ scoped_refptr<LoadServiceCallbacks> callbacks); |
+ void LoadNetworkService(const GURL& resolved_url, |
+ scoped_refptr<LoadServiceCallbacks> callbacks); |
+ void OnLoadNetworkServiceComplete( |
+ scoped_refptr<LoadServiceCallbacks> callbacks, |
+ URLResponsePtr url_response); |
+ void RunLibrary(const base::FilePath& response_file, |
+ scoped_refptr<LoadServiceCallbacks> callbacks, |
+ bool delete_file_after, |
+ bool response_path_exists); |
+ |
Context* const context_; |
scoped_ptr<DynamicServiceRunnerFactory> runner_factory_; |
NetworkServicePtr network_service_; |
+ URLLoaderPtr url_loader_; |
+ MimeTypeToURLMap mime_type_to_url_; |
+ base::WeakPtrFactory<DynamicServiceLoader> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(DynamicServiceLoader); |
}; |