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

Unified Diff: shell/native_application_loader.h

Issue 930243006: Simplify the ApplicationLoader interface in preparation for changes. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: ptal Created 5 years, 10 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 | « shell/external_application_listener_unittest.cc ('k') | shell/native_application_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/native_application_loader.h
diff --git a/shell/dynamic_application_loader.h b/shell/native_application_loader.h
similarity index 68%
rename from shell/dynamic_application_loader.h
rename to shell/native_application_loader.h
index e91bcea29bb025a94343e8668eb1e8375802f974..db665994dc78c6693604fb96bae16d0e11215245 100644
--- a/shell/dynamic_application_loader.h
+++ b/shell/native_application_loader.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SHELL_DYNAMIC_APPLICATION_LOADER_H_
-#define SHELL_DYNAMIC_APPLICATION_LOADER_H_
+#ifndef SHELL_NATIVE_APPLICATION_LOADER_H_
+#define SHELL_NATIVE_APPLICATION_LOADER_H_
#include <map>
@@ -24,26 +24,24 @@ class Context;
class DynamicServiceRunnerFactory;
class DynamicServiceRunner;
-// An implementation of ApplicationLoader that retrieves a dynamic library
-// containing the implementation of the service and loads/runs it (via a
-// DynamicServiceRunner).
-class DynamicApplicationLoader : public ApplicationLoader {
+// Loads applications that might be either DSOs or content applications.
+// TODO(aa): Tear this apart into:
+// - fetching urls (probably two sublcasses for http/file)
+// - detecting type of response (dso, content, nacl (future))
+// - executing response (either via DynamicServiceRunner or a content handler)
+class NativeApplicationLoader : public mojo::NativeApplicationLoader {
public:
- DynamicApplicationLoader(
+ NativeApplicationLoader(
Context* context,
scoped_ptr<DynamicServiceRunnerFactory> runner_factory);
- ~DynamicApplicationLoader() override;
+ ~NativeApplicationLoader() override;
void RegisterContentHandler(const std::string& mime_type,
const GURL& content_handler_url);
- // ApplicationLoader methods:
- void Load(ApplicationManager* manager,
- const GURL& url,
+ void Load(const GURL& url,
InterfaceRequest<Application> application_request,
LoadCallback callback) override;
- void OnApplicationError(ApplicationManager* manager,
- const GURL& url) override;
private:
class Loader;
@@ -62,10 +60,10 @@ class DynamicApplicationLoader : public ApplicationLoader {
ScopedVector<Loader> loaders_;
LoaderCompleteCallback loader_complete_callback_;
- DISALLOW_COPY_AND_ASSIGN(DynamicApplicationLoader);
+ DISALLOW_COPY_AND_ASSIGN(NativeApplicationLoader);
};
} // namespace shell
} // namespace mojo
-#endif // SHELL_DYNAMIC_APPLICATION_LOADER_H_
+#endif // SHELL_NATIVE_APPLICATION_LOADER_H_
« no previous file with comments | « shell/external_application_listener_unittest.cc ('k') | shell/native_application_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698