1 // Copyright (c) 2011 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 WEBKIT_CHILD_FTP_DIRECTORY_LISTING_RESPONSE_DELEGATE_H_
9 #define WEBKIT_CHILD_FTP_DIRECTORY_LISTING_RESPONSE_DELEGATE_H_
13 #include "base/basictypes.h"
14 #include "third_party/WebKit/public/platform/WebURLResponse.h"
18 class WebURLLoaderClient
;
23 namespace webkit_glue
{
25 class FtpDirectoryListingResponseDelegate
{
27 FtpDirectoryListingResponseDelegate(blink::WebURLLoaderClient
* client
,
28 blink::WebURLLoader
* loader
,
29 const blink::WebURLResponse
& response
);
31 // Passed through from ResourceHandleInternal
32 void OnReceivedData(const char* data
, int data_len
);
33 void OnCompletedRequest();
36 void Init(const GURL
& response_url
);
38 void SendDataToClient(const std::string
& data
);
40 // Pointers to the client and associated loader so we can make callbacks as
41 // we parse pieces of data.
42 blink::WebURLLoaderClient
* client_
;
43 blink::WebURLLoader
* loader_
;
45 // Buffer for data received from the network.
48 DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingResponseDelegate
);
51 } // namespace webkit_glue
53 #endif // WEBKIT_CHILD_FTP_DIRECTORY_LISTING_RESPONSE_DELEGATE_H_