OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_APPLICATION_MANAGER_APPLICATION_LOADER_H_ | 5 #ifndef MOJO_APPLICATION_MANAGER_APPLICATION_LOADER_H_ |
6 #define MOJO_APPLICATION_MANAGER_APPLICATION_LOADER_H_ | 6 #define MOJO_APPLICATION_MANAGER_APPLICATION_LOADER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "mojo/application_manager/application_manager_export.h" | 9 #include "mojo/application_manager/application_manager_export.h" |
10 #include "mojo/public/cpp/system/core.h" | 10 #include "mojo/public/cpp/system/core.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 class MOJO_APPLICATION_MANAGER_EXPORT LoadCallbacks | 27 class MOJO_APPLICATION_MANAGER_EXPORT LoadCallbacks |
28 : public base::RefCounted<LoadCallbacks> { | 28 : public base::RefCounted<LoadCallbacks> { |
29 public: | 29 public: |
30 // Register the requested application with ApplicationManager. If the | 30 // Register the requested application with ApplicationManager. If the |
31 // returned handle is valid, it should be used to implement the | 31 // returned handle is valid, it should be used to implement the |
32 // mojo::Application interface. | 32 // mojo::Application interface. |
33 virtual ScopedMessagePipeHandle RegisterApplication() = 0; | 33 virtual ScopedMessagePipeHandle RegisterApplication() = 0; |
34 | 34 |
35 // Load the requested application with a content handler. | 35 // Load the requested application with a content handler. |
36 virtual void LoadWithContentHandler(const GURL& content_handler_url, | 36 virtual void LoadWithContentHandler(const GURL& content_handler_url, |
37 URLResponsePtr response) = 0; | 37 URLResponsePtr url_response) = 0; |
38 | 38 |
39 protected: | 39 protected: |
40 friend base::RefCounted<LoadCallbacks>; | 40 friend base::RefCounted<LoadCallbacks>; |
41 virtual ~LoadCallbacks() {} | 41 virtual ~LoadCallbacks() {} |
42 }; | 42 }; |
43 | 43 |
44 // Implements RegisterApplication() by returning a handle that was specified | 44 // Implements RegisterApplication() by returning a handle that was specified |
45 // at construction time. LoadWithContentHandler() is not supported. | 45 // at construction time. LoadWithContentHandler() is not supported. |
46 class MOJO_APPLICATION_MANAGER_EXPORT SimpleLoadCallbacks | 46 class MOJO_APPLICATION_MANAGER_EXPORT SimpleLoadCallbacks |
47 : public LoadCallbacks { | 47 : public LoadCallbacks { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 virtual void OnApplicationError(ApplicationManager* manager, | 79 virtual void OnApplicationError(ApplicationManager* manager, |
80 const GURL& url) = 0; | 80 const GURL& url) = 0; |
81 | 81 |
82 protected: | 82 protected: |
83 ApplicationLoader() {} | 83 ApplicationLoader() {} |
84 }; | 84 }; |
85 | 85 |
86 } // namespace mojo | 86 } // namespace mojo |
87 | 87 |
88 #endif // MOJO_APPLICATION_MANAGER_APPLICATION_LOADER_H_ | 88 #endif // MOJO_APPLICATION_MANAGER_APPLICATION_LOADER_H_ |
OLD | NEW |