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 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "components/nacl/renderer/ppb_nacl_private.h" | 12 #include "components/nacl/renderer/ppb_nacl_private.h" |
13 #include "third_party/WebKit/public/web/WebAssociatedURLLoaderClient.h" | 13 #include "third_party/WebKit/public/web/WebAssociatedURLLoaderClient.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 class WebAssociatedURLLoader; | 16 class WebAssociatedURLLoader; |
17 struct WebURLError; | 17 struct WebURLError; |
18 class WebURLLoader; | |
19 class WebURLResponse; | 18 class WebURLResponse; |
20 } | 19 } |
21 | 20 |
22 namespace nacl { | 21 namespace nacl { |
23 | 22 |
24 // Downloads a NaCl manifest (.nmf) and returns the contents of the file to | 23 // Downloads a NaCl manifest (.nmf) and returns the contents of the file to |
25 // caller through a callback. | 24 // caller through a callback. |
26 class ManifestDownloader : public blink::WebAssociatedURLLoaderClient { | 25 class ManifestDownloader : public blink::WebAssociatedURLLoaderClient { |
27 public: | 26 public: |
28 typedef base::Callback<void(PP_NaClError, const std::string&)> Callback; | 27 typedef base::Callback<void(PP_NaClError, const std::string&)> Callback; |
(...skipping 22 matching lines...) Expand all Loading... |
51 | 50 |
52 std::unique_ptr<blink::WebAssociatedURLLoader> url_loader_; | 51 std::unique_ptr<blink::WebAssociatedURLLoader> url_loader_; |
53 bool is_installed_; | 52 bool is_installed_; |
54 Callback cb_; | 53 Callback cb_; |
55 std::string buffer_; | 54 std::string buffer_; |
56 int status_code_; | 55 int status_code_; |
57 PP_NaClError pp_nacl_error_; | 56 PP_NaClError pp_nacl_error_; |
58 }; | 57 }; |
59 | 58 |
60 } // namespace nacl | 59 } // namespace nacl |
OLD | NEW |