Index: mojo/application_manager/application_manager.h |
diff --git a/mojo/application_manager/application_manager.h b/mojo/application_manager/application_manager.h |
index bb58c1a8553d7cc87d7488cef11f1a7306336d74..01f31634e6362b8e1371b32d618411a1ec9c9f9f 100644 |
--- a/mojo/application_manager/application_manager.h |
+++ b/mojo/application_manager/application_manager.h |
@@ -20,6 +20,11 @@ namespace mojo { |
class MOJO_APPLICATION_MANAGER_EXPORT ApplicationManager { |
public: |
+ class Delegate { |
+ public: |
+ virtual void OnServiceError(const GURL& url) = 0; |
tim (not reviewing)
2014/08/23 00:14:26
Please add a comment describing what a service err
DaveMoore
2014/08/24 22:31:11
Done and Done.
|
+ }; |
tim (not reviewing)
2014/08/23 00:14:27
Should have a virtual ~Delegate... (protected: if
DaveMoore
2014/08/24 22:31:11
Done.
|
+ |
// API for testing. |
class MOJO_APPLICATION_MANAGER_EXPORT TestAPI { |
public: |
@@ -70,6 +75,8 @@ class MOJO_APPLICATION_MANAGER_EXPORT ApplicationManager { |
const GURL& application_url, |
const std::string& interface_name); |
+ void set_delegate(Delegate* delegate) { delegate_ = delegate; } |
tim (not reviewing)
2014/08/23 00:14:27
Do we need to support the NULL-delegate case or co
DaveMoore
2014/08/24 22:31:11
I don't think so. It's up to the creator of the Ap
|
+ |
// Sets the default Loader to be used if not overridden by SetLoaderForURL() |
// or SetLoaderForScheme(). |
void set_default_loader(scoped_ptr<ApplicationLoader> loader) { |
@@ -122,6 +129,7 @@ class MOJO_APPLICATION_MANAGER_EXPORT ApplicationManager { |
// Removes a ShellImpl when it encounters an error. |
void OnShellImplError(ShellImpl* shell_impl); |
+ Delegate* delegate_; |
// Loader management. |
URLToLoaderMap url_to_loader_; |
SchemeToLoaderMap scheme_to_loader_; |