| 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_SHELL_DYNAMIC_APPLICATION_LOADER_H_ | 5 #ifndef MOJO_SHELL_DYNAMIC_APPLICATION_LOADER_H_ |
| 6 #define MOJO_SHELL_DYNAMIC_APPLICATION_LOADER_H_ | 6 #define MOJO_SHELL_DYNAMIC_APPLICATION_LOADER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 scoped_ptr<DynamicServiceRunnerFactory> runner_factory); | 33 scoped_ptr<DynamicServiceRunnerFactory> runner_factory); |
| 34 virtual ~DynamicApplicationLoader(); | 34 virtual ~DynamicApplicationLoader(); |
| 35 | 35 |
| 36 void RegisterContentHandler(const std::string& mime_type, | 36 void RegisterContentHandler(const std::string& mime_type, |
| 37 const GURL& content_handler_url); | 37 const GURL& content_handler_url); |
| 38 | 38 |
| 39 // ApplicationLoader methods: | 39 // ApplicationLoader methods: |
| 40 virtual void Load(ApplicationManager* manager, | 40 virtual void Load(ApplicationManager* manager, |
| 41 const GURL& url, | 41 const GURL& url, |
| 42 scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; | 42 scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; |
| 43 virtual void OnServiceError(ApplicationManager* manager, | 43 virtual void OnApplicationError(ApplicationManager* manager, |
| 44 const GURL& url) OVERRIDE; | 44 const GURL& url) OVERRIDE; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 typedef std::map<std::string, GURL> MimeTypeToURLMap; | 47 typedef std::map<std::string, GURL> MimeTypeToURLMap; |
| 48 | 48 |
| 49 void LoadLocalService(const GURL& resolved_url, | 49 void LoadLocalService(const GURL& resolved_url, |
| 50 scoped_refptr<LoadCallbacks> callbacks); | 50 scoped_refptr<LoadCallbacks> callbacks); |
| 51 void LoadNetworkService(const GURL& resolved_url, | 51 void LoadNetworkService(const GURL& resolved_url, |
| 52 scoped_refptr<LoadCallbacks> callbacks); | 52 scoped_refptr<LoadCallbacks> callbacks); |
| 53 void OnLoadNetworkServiceComplete(scoped_refptr<LoadCallbacks> callbacks, | 53 void OnLoadNetworkServiceComplete(scoped_refptr<LoadCallbacks> callbacks, |
| 54 URLResponsePtr url_response); | 54 URLResponsePtr url_response); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 67 MimeTypeToURLMap mime_type_to_url_; | 67 MimeTypeToURLMap mime_type_to_url_; |
| 68 base::WeakPtrFactory<DynamicApplicationLoader> weak_ptr_factory_; | 68 base::WeakPtrFactory<DynamicApplicationLoader> weak_ptr_factory_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(DynamicApplicationLoader); | 70 DISALLOW_COPY_AND_ASSIGN(DynamicApplicationLoader); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace shell | 73 } // namespace shell |
| 74 } // namespace mojo | 74 } // namespace mojo |
| 75 | 75 |
| 76 #endif // MOJO_SHELL_DYNAMIC_APPLICATION_LOADER_H_ | 76 #endif // MOJO_SHELL_DYNAMIC_APPLICATION_LOADER_H_ |
| OLD | NEW |