Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_ | |
| 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_ | |
| 7 | |
| 8 #include "net/base/completion_callback.h" | |
| 9 #include "net/base/load_states.h" | |
| 10 #include "net/base/net_export.h" | |
| 11 #include "net/base/request_priority.h" | |
| 12 #include "net/base/upload_progress.h" | |
| 13 #include "net/http/http_transaction.h" | |
| 14 #include "net/websockets/websocket_handshake_stream_base.h" | |
| 15 | |
| 16 class DevToolsNetworkController; | |
| 17 class GURL; | |
| 18 | |
| 19 namespace net { | |
| 20 class AuthCredentials; | |
| 21 class BoundNetLog; | |
| 22 class HttpRequestHeaders; | |
| 23 struct HttpRequestInfo; | |
| 24 class HttpResponseInfo; | |
| 25 class HttpNetworkSession; | |
| 26 class IOBuffer; | |
| 27 struct LoadTimingInfo; | |
| 28 class X509Certificate; | |
| 29 } // namespace net | |
| 30 | |
| 31 class NET_EXPORT DevToolsNetworkTransaction : public net::HttpTransaction { | |
|
mmenke
2014/03/31 18:10:20
Should more heavily comment this class.
eustas
2014/04/18 12:33:19
Done.
| |
| 32 public: | |
| 33 DevToolsNetworkTransaction( | |
| 34 DevToolsNetworkController* controller, | |
| 35 scoped_ptr<net::HttpTransaction>& network_transaction); | |
| 36 | |
| 37 virtual ~DevToolsNetworkTransaction(); | |
| 38 | |
| 39 const GURL& GetURL() const; | |
| 40 void Stop(); | |
| 41 | |
| 42 // HttpTransaction methods: | |
| 43 virtual int Start( | |
| 44 const net::HttpRequestInfo* request_info, | |
| 45 const net::CompletionCallback& callback, | |
| 46 const net::BoundNetLog& net_log) OVERRIDE; | |
| 47 virtual int RestartIgnoringLastError( | |
| 48 const net::CompletionCallback& callback) OVERRIDE; | |
| 49 virtual int RestartWithCertificate( | |
| 50 net::X509Certificate* client_cert, | |
| 51 const net::CompletionCallback& callback) OVERRIDE; | |
| 52 virtual int RestartWithAuth( | |
| 53 const net::AuthCredentials& credentials, | |
| 54 const net::CompletionCallback& callback) OVERRIDE; | |
| 55 virtual bool IsReadyToRestartForAuth() OVERRIDE; | |
| 56 | |
| 57 virtual int Read( | |
| 58 net::IOBuffer* buf, | |
| 59 int buf_len, | |
| 60 const net::CompletionCallback& callback) OVERRIDE; | |
| 61 virtual void StopCaching() OVERRIDE; | |
| 62 virtual bool GetFullRequestHeaders( | |
| 63 net::HttpRequestHeaders* headers) const OVERRIDE; | |
| 64 virtual int64 GetTotalReceivedBytes() const OVERRIDE; | |
| 65 virtual void DoneReading() OVERRIDE; | |
| 66 virtual const net::HttpResponseInfo* GetResponseInfo() const OVERRIDE; | |
| 67 virtual net::LoadState GetLoadState() const OVERRIDE; | |
| 68 virtual net::UploadProgress GetUploadProgress() const OVERRIDE; | |
| 69 virtual void SetQuicServerInfo( | |
| 70 net::QuicServerInfo* quic_server_info) OVERRIDE; | |
| 71 virtual bool GetLoadTimingInfo( | |
| 72 net::LoadTimingInfo* load_timing_info) const OVERRIDE; | |
| 73 virtual void SetPriority(net::RequestPriority priority) OVERRIDE; | |
| 74 virtual void SetWebSocketHandshakeStreamCreateHelper( | |
| 75 net::WebSocketHandshakeStreamBase::CreateHelper* create_helper) OVERRIDE; | |
| 76 virtual void SetBeforeNetworkStartCallback( | |
| 77 const BeforeNetworkStartCallback& callback) OVERRIDE; | |
| 78 virtual int ResumeNetworkStart() OVERRIDE; | |
| 79 | |
| 80 private: | |
| 81 void OnCallback(int result); | |
| 82 | |
| 83 const uint64 id_; | |
| 84 DevToolsNetworkController* controller_; | |
| 85 scoped_ptr<net::HttpTransaction> network_transaction_; | |
| 86 GURL url_; | |
| 87 net::CompletionCallback proxy_callback_; | |
| 88 net::CompletionCallback callback_; | |
| 89 | |
| 90 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkTransaction); | |
| 91 }; | |
| 92 | |
| 93 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_ | |
| OLD | NEW |