| Index: chrome/browser/devtools/devtools_network_transaction.h
|
| diff --git a/chrome/browser/devtools/devtools_network_transaction.h b/chrome/browser/devtools/devtools_network_transaction.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d098cc55d3ecc095914b3b00e76e0d26cffbbde7
|
| --- /dev/null
|
| +++ b/chrome/browser/devtools/devtools_network_transaction.h
|
| @@ -0,0 +1,95 @@
|
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_
|
| +#define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_
|
| +
|
| +#include "base/memory/weak_ptr.h"
|
| +#include "net/base/completion_callback.h"
|
| +#include "net/base/load_states.h"
|
| +#include "net/base/net_export.h"
|
| +#include "net/base/request_priority.h"
|
| +#include "net/base/upload_progress.h"
|
| +#include "net/http/http_transaction.h"
|
| +#include "net/websockets/websocket_handshake_stream_base.h"
|
| +
|
| +class DevToolsNetworkController;
|
| +class GURL;
|
| +
|
| +namespace net {
|
| +class AuthCredentials;
|
| +class BoundNetLog;
|
| +class HttpRequestHeaders;
|
| +struct HttpRequestInfo;
|
| +class HttpResponseInfo;
|
| +class HttpNetworkSession;
|
| +class IOBuffer;
|
| +struct LoadTimingInfo;
|
| +class X509Certificate;
|
| +} // namespace net
|
| +
|
| +class NET_EXPORT DevToolsNetworkTransaction : public net::HttpTransaction {
|
| + public:
|
| + DevToolsNetworkTransaction(
|
| + const base::WeakPtr<DevToolsNetworkController>& controller,
|
| + scoped_ptr<net::HttpTransaction>& network_transaction);
|
| +
|
| + virtual ~DevToolsNetworkTransaction();
|
| +
|
| + std::string GetId();
|
| + const GURL& GetURL();
|
| + void Stop();
|
| +
|
| + // HttpTransaction methods:
|
| + virtual int Start(
|
| + const net::HttpRequestInfo* request_info,
|
| + const net::CompletionCallback& callback,
|
| + const net::BoundNetLog& net_log) OVERRIDE;
|
| + virtual int RestartIgnoringLastError(
|
| + const net::CompletionCallback& callback) OVERRIDE;
|
| + virtual int RestartWithCertificate(
|
| + net::X509Certificate* client_cert,
|
| + const net::CompletionCallback& callback) OVERRIDE;
|
| + virtual int RestartWithAuth(
|
| + const net::AuthCredentials& credentials,
|
| + const net::CompletionCallback& callback) OVERRIDE;
|
| + virtual bool IsReadyToRestartForAuth() OVERRIDE;
|
| +
|
| + virtual int Read(
|
| + net::IOBuffer* buf,
|
| + int buf_len,
|
| + const net::CompletionCallback& callback) OVERRIDE;
|
| + virtual void StopCaching() OVERRIDE;
|
| + virtual bool GetFullRequestHeaders(
|
| + net::HttpRequestHeaders* headers) const OVERRIDE;
|
| + virtual int64 GetTotalReceivedBytes() const OVERRIDE;
|
| + virtual void DoneReading() OVERRIDE;
|
| + virtual const net::HttpResponseInfo* GetResponseInfo() const OVERRIDE;
|
| + virtual net::LoadState GetLoadState() const OVERRIDE;
|
| + virtual net::UploadProgress GetUploadProgress() const OVERRIDE;
|
| + virtual void SetQuicServerInfo(
|
| + net::QuicServerInfo* quic_server_info) OVERRIDE;
|
| + virtual bool GetLoadTimingInfo(
|
| + net::LoadTimingInfo* load_timing_info) const OVERRIDE;
|
| + virtual void SetPriority(net::RequestPriority priority) OVERRIDE;
|
| + virtual void SetWebSocketHandshakeStreamCreateHelper(
|
| + net::WebSocketHandshakeStreamBase::CreateHelper* create_helper) OVERRIDE;
|
| + virtual void SetBeforeNetworkStartCallback(
|
| + const BeforeNetworkStartCallback& callback) OVERRIDE;
|
| + virtual int ResumeNetworkStart() OVERRIDE;
|
| +
|
| + private:
|
| + void OnCallback(int result);
|
| +
|
| + base::WeakPtr<DevToolsNetworkController> controller_;
|
| + scoped_ptr<net::HttpTransaction> network_transaction_;
|
| + const std::string id_;
|
| + GURL url_;
|
| + net::CompletionCallback proxy_callback_;
|
| + net::CompletionCallback callback_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkTransaction);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_
|
|
|