| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium OS 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 JAVASCRIPT_REQUESTOR_INTERFACE_H_ | |
| 6 #define JAVASCRIPT_REQUESTOR_INTERFACE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 // Makes requests to JavaScript. Requests are asynchronous and responses must be | |
| 11 // handled by other classes. This class stricly makes requests. | |
| 12 class JavaScriptRequestorInterface { | |
| 13 public: | |
| 14 virtual ~JavaScriptRequestorInterface() {} | |
| 15 | |
| 16 // Request a file chunk from JavaScript. The request is asynchronous. | |
| 17 // offset must be >= 0 and bytes_to_read > 0. | |
| 18 virtual void RequestFileChunk(const std::string& request_id, | |
| 19 int64_t offset, | |
| 20 int64_t bytes_to_read) = 0; | |
| 21 | |
| 22 // Request a passphrase from JavaScript. The request is asynchronous. | |
| 23 virtual void RequestPassphrase(const std::string& request_id) = 0; | |
| 24 }; | |
| 25 | |
| 26 #endif // JAVASCRIPT_REQUESTOR_INTERFACE_H_ | |
| OLD | NEW |