2011-02-09 23:04:35 +01:00
|
|
|
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
#ifndef CEF_LIBCEF_RESPONSE_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_RESPONSE_IMPL_H_
|
|
|
|
#pragma once
|
2011-02-09 23:04:35 +01:00
|
|
|
|
2011-12-23 18:36:30 +01:00
|
|
|
#include "include/cef_response.h"
|
2011-02-09 23:04:35 +01:00
|
|
|
|
2011-05-26 20:11:56 +02:00
|
|
|
namespace net {
|
|
|
|
class HttpResponseHeaders;
|
|
|
|
}
|
2011-02-09 23:04:35 +01:00
|
|
|
namespace WebKit {
|
|
|
|
class WebURLResponse;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Implementation of CefResponse.
|
2012-01-10 00:46:23 +01:00
|
|
|
class CefResponseImpl : public CefResponse {
|
|
|
|
public:
|
2011-04-21 18:46:16 +02:00
|
|
|
CefResponseImpl();
|
2012-01-10 00:46:23 +01:00
|
|
|
explicit CefResponseImpl(const WebKit::WebURLResponse& response);
|
2011-02-09 23:04:35 +01:00
|
|
|
~CefResponseImpl() {}
|
|
|
|
|
|
|
|
// CefResponse API
|
|
|
|
virtual int GetStatus();
|
2011-04-21 18:46:16 +02:00
|
|
|
virtual void SetStatus(int status);
|
2011-02-09 23:04:35 +01:00
|
|
|
virtual CefString GetStatusText();
|
2011-04-21 18:46:16 +02:00
|
|
|
virtual void SetStatusText(const CefString& statusText);
|
|
|
|
virtual CefString GetMimeType();
|
|
|
|
virtual void SetMimeType(const CefString& mimeType);
|
2011-02-09 23:04:35 +01:00
|
|
|
virtual CefString GetHeader(const CefString& name);
|
|
|
|
virtual void GetHeaderMap(HeaderMap& headerMap);
|
2011-04-21 18:46:16 +02:00
|
|
|
virtual void SetHeaderMap(const HeaderMap& headerMap);
|
|
|
|
|
2011-05-26 20:11:56 +02:00
|
|
|
net::HttpResponseHeaders* GetResponseHeaders();
|
2011-02-09 23:04:35 +01:00
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
protected:
|
2011-02-09 23:04:35 +01:00
|
|
|
int status_code_;
|
|
|
|
CefString status_text_;
|
2011-04-21 18:46:16 +02:00
|
|
|
CefString mime_type_;
|
2011-02-09 23:04:35 +01:00
|
|
|
HeaderMap header_map_;
|
2011-05-20 16:42:25 +02:00
|
|
|
|
|
|
|
IMPLEMENT_REFCOUNTING(CefResponseImpl);
|
|
|
|
IMPLEMENT_LOCKING(CefResponseImpl);
|
2011-02-09 23:04:35 +01:00
|
|
|
};
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
#endif // CEF_LIBCEF_RESPONSE_IMPL_H_
|