OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_COMMON_APPLICATION_REGISTRY_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_APPLICATION_REGISTRY_H_ |
| 7 |
| 8 #include "base/bind.h" |
| 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/common/content_export.h" |
| 12 |
| 13 class GURL; |
| 14 |
| 15 namespace mojo { |
| 16 class ApplicationDelegate; |
| 17 } |
| 18 |
| 19 namespace content { |
| 20 |
| 21 // This is the embedder interface used to register URL-to-application mappings. |
| 22 // See ContentBrowserClient::RegisterMojoApplications and |
| 23 // ContentUtilityClient::RegisterMojoApplications. |
| 24 class CONTENT_EXPORT ApplicationRegistry { |
| 25 public: |
| 26 using StaticAppFactory = |
| 27 base::Callback<scoped_ptr<mojo::ApplicationDelegate>()>; |
| 28 |
| 29 ApplicationRegistry() {} |
| 30 virtual ~ApplicationRegistry() {} |
| 31 |
| 32 virtual void RegisterStaticAppForURL(const GURL& url, |
| 33 const StaticAppFactory& factory) = 0; |
| 34 |
| 35 private: |
| 36 DISALLOW_COPY_AND_ASSIGN(ApplicationRegistry); |
| 37 }; |
| 38 |
| 39 } // namespace content |
| 40 |
| 41 #endif // CONTENT_PUBLIC_COMMON_APPLICATION_REGISTRY_H_ |
OLD | NEW |