1 // Copyright (c) 2012 The Chromium 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.
5 #ifndef ANDROID_WEBVIEW_BROWSER_INTERCEPTED_REQUEST_DATA_H_
6 #define ANDROID_WEBVIEW_BROWSER_INTERCEPTED_REQUEST_DATA_H_
10 #include "base/memory/scoped_ptr.h"
15 class NetworkDelegate
;
18 namespace android_webview
{
20 // This class represents the Java-side data that is to be used to complete a
21 // particular URLRequest.
22 class InterceptedRequestData
{
24 virtual ~InterceptedRequestData() {}
26 // This creates a URLRequestJob for the |request| wich will read data from
27 // the |intercepted_request_data| structure (instead of going to the network
29 // The newly created job does not take ownership of |this|.
30 virtual net::URLRequestJob
* CreateJobFor(
31 net::URLRequest
* request
,
32 net::NetworkDelegate
* network_delegate
) const = 0;
35 InterceptedRequestData() {}
38 DISALLOW_COPY_AND_ASSIGN(InterceptedRequestData
);
41 } // namespace android_webview
43 #endif // ANDROID_WEBVIEW_BROWSER_INTERCEPTED_REQUEST_DATA_H_