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
3 // found in the LICENSE file.
5 // A delegate class of WebURLLoaderImpl that handles text/vnd.chromium.ftp-dir
8 #ifndef CONTENT_CHILD_FTP_DIRECTORY_LISTING_RESPONSE_DELEGATE_H_
9 #define CONTENT_CHILD_FTP_DIRECTORY_LISTING_RESPONSE_DELEGATE_H_
13 #include "base/basictypes.h"
14 #include "third_party/WebKit/public/platform/WebURLResponse.h"
18 class WebURLLoaderClient
;
25 class FtpDirectoryListingResponseDelegate
{
27 FtpDirectoryListingResponseDelegate(blink::WebURLLoaderClient
* client
,
28 blink::WebURLLoader
* loader
,
29 const blink::WebURLResponse
& response
);
31 // The request has been canceled, so stop making calls to the client.
34 // Passed through from ResourceHandleInternal
35 void OnReceivedData(const char* data
, int data_len
);
36 void OnCompletedRequest();
39 void Init(const GURL
& response_url
);
41 void SendDataToClient(const std::string
& data
);
43 // Pointers to the client and associated loader so we can make callbacks as
44 // we parse pieces of data.
45 blink::WebURLLoaderClient
* client_
;
46 blink::WebURLLoader
* loader_
;
48 // Buffer for data received from the network.
51 DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingResponseDelegate
);
54 } // namespace content
56 #endif // CONTENT_CHILD_FTP_DIRECTORY_LISTING_RESPONSE_DELEGATE_H_