mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add CefServer API for handling HTTP/WebSocket requests (issue #2278)
This commit is contained in:
@@ -23,6 +23,12 @@ void RunTest(CefRefPtr<CefBrowser> browser, int id);
|
||||
// Returns the contents of the CefRequest as a string.
|
||||
std::string DumpRequestContents(CefRefPtr<CefRequest> request);
|
||||
|
||||
// Returns the dump response as a stream. |request| is the request.
|
||||
// |response_headers| will be populated with extra response headers, if any.
|
||||
CefRefPtr<CefStreamReader> GetDumpResponse(
|
||||
CefRefPtr<CefRequest> request,
|
||||
CefResponse::HeaderMap& response_headers);
|
||||
|
||||
// Returns a data: URI with the specified contents.
|
||||
std::string GetDataURI(const std::string& data, const std::string& mime_type);
|
||||
|
||||
@@ -35,6 +41,10 @@ void SetupResourceManager(CefRefPtr<CefResourceManager> resource_manager);
|
||||
// Show a JS alert message.
|
||||
void Alert(CefRefPtr<CefBrowser> browser, const std::string& message);
|
||||
|
||||
// Returns true if |url| is a test URL with the specified |path|. This matches
|
||||
// both http://tests/<path> and http://localhost:xxxx/<path>.
|
||||
bool IsTestURL(const std::string& url, const std::string& path);
|
||||
|
||||
// Create all CefMessageRouterBrowserSide::Handler objects. They will be
|
||||
// deleted when the ClientHandler is destroyed.
|
||||
typedef std::set<CefMessageRouterBrowserSide::Handler*> MessageHandlerSet;
|
||||
|
Reference in New Issue
Block a user