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

Unified Diff: content/public/common/application_registry.h

Issue 1149833007: Embed a mojo ApplicationManager in content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: misc build fixes Created 5 years, 7 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
Index: content/public/common/application_registry.h
diff --git a/content/public/common/application_registry.h b/content/public/common/application_registry.h
new file mode 100644
index 0000000000000000000000000000000000000000..0e514b302b9c6d9aea9e350cca6def16e7c8f49c
--- /dev/null
+++ b/content/public/common/application_registry.h
@@ -0,0 +1,41 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_COMMON_APPLICATION_REGISTRY_H_
+#define CONTENT_PUBLIC_COMMON_APPLICATION_REGISTRY_H_
+
+#include "base/bind.h"
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+
+class GURL;
+
+namespace mojo {
+class ApplicationDelegate;
+}
+
+namespace content {
+
+// This is the embedder interface used to register URL-to-application mappings.
+// See ContentBrowserClient::RegisterMojoApplications and
+// ContentUtilityClient::RegisterMojoApplications.
+class CONTENT_EXPORT ApplicationRegistry {
+ public:
+ using StaticAppFactory =
+ base::Callback<scoped_ptr<mojo::ApplicationDelegate>()>;
+
+ ApplicationRegistry() {}
+ virtual ~ApplicationRegistry() {}
+
+ virtual void RegisterStaticAppForURL(const GURL& url,
+ const StaticAppFactory& factory) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ApplicationRegistry);
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_COMMON_APPLICATION_REGISTRY_H_

Powered by Google App Engine
This is Rietveld 408576698