OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_APPCACHE_APPCACHE_EXECUTABLE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_EXECUTABLE_HANDLER_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_EXECUTABLE_HANDLER_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_EXECUTABLE_HANDLER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
11 #include "url/gurl.h" | 12 #include "url/gurl.h" |
12 | 13 |
13 namespace net { | 14 namespace net { |
14 class IOBuffer; | 15 class IOBuffer; |
15 class URLRequest; | 16 class URLRequest; |
16 } | 17 } |
17 | 18 |
18 namespace content { | 19 namespace content { |
19 | 20 |
(...skipping 15 matching lines...) Expand all Loading... |
35 // Deletion of the handler cancels all pending callbacks. | 36 // Deletion of the handler cancels all pending callbacks. |
36 virtual ~AppCacheExecutableHandler() {} | 37 virtual ~AppCacheExecutableHandler() {} |
37 | 38 |
38 virtual void HandleRequest(net::URLRequest* req, | 39 virtual void HandleRequest(net::URLRequest* req, |
39 ResponseCallback callback) = 0; | 40 ResponseCallback callback) = 0; |
40 }; | 41 }; |
41 | 42 |
42 // A factory to produce instances. | 43 // A factory to produce instances. |
43 class CONTENT_EXPORT AppCacheExecutableHandlerFactory { | 44 class CONTENT_EXPORT AppCacheExecutableHandlerFactory { |
44 public: | 45 public: |
45 virtual scoped_ptr<AppCacheExecutableHandler> CreateHandler( | 46 virtual std::unique_ptr<AppCacheExecutableHandler> CreateHandler( |
46 const GURL& handler_url, net::IOBuffer* handler_source) = 0; | 47 const GURL& handler_url, |
| 48 net::IOBuffer* handler_source) = 0; |
47 | 49 |
48 protected: | 50 protected: |
49 virtual ~AppCacheExecutableHandlerFactory() {} | 51 virtual ~AppCacheExecutableHandlerFactory() {} |
50 }; | 52 }; |
51 | 53 |
52 } // namespace content | 54 } // namespace content |
53 | 55 |
54 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_EXECUTABLE_HANDLER_H_ | 56 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_EXECUTABLE_HANDLER_H_ |
OLD | NEW |