Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / android_webview / browser / intercepted_request_data.h
blob672833c09e7df108a36c1b5025e760502390ce8e
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_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 namespace net {
13 class URLRequest;
14 class URLRequestJob;
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 {
23 public:
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
28 // or to the cache).
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;
34 protected:
35 InterceptedRequestData() {}
37 private:
38 DISALLOW_COPY_AND_ASSIGN(InterceptedRequestData);
41 } // namespace android_webview
43 #endif // ANDROID_WEBVIEW_BROWSER_INTERCEPTED_REQUEST_DATA_H_