Flutter Engine
The Flutter Engine
Namespaces | Functions
Response.cpp File Reference
#include "tools/skiaserve/Response.h"
#include "tools/skiaserve/Request.h"
#include "include/core/SkData.h"
#include "include/core/SkString.h"
#include "tools/flags/CommandLineFlags.h"
#include "microhttpd.h"

Go to the source code of this file.

Namespaces

namespace  Response
 

Functions

static DEFINE_string (source, "https://debugger-assets.skia.org", "Where to load the web UI from.")
 
static SkString generate_template (SkString source)
 
int Response::SendOK (MHD_Connection *connection)
 
int Response::SendError (MHD_Connection *connection, const char *msg)
 
int Response::SendData (MHD_Connection *connection, const SkData *data, const char *type, bool setContentDisposition, const char *dispositionString)
 
int Response::SendTemplate (MHD_Connection *connection, bool redirect, const char *redirectUrl)
 

Function Documentation

◆ DEFINE_string()

static DEFINE_string ( source  ,
"https://debugger-assets.skia.org"  ,
"Where to load the web UI from."   
)
static

◆ generate_template()

static SkString generate_template ( SkString  source)
static

Definition at line 20 of file Response.cpp.

20 {
21 SkString debuggerTemplate;
22 debuggerTemplate.appendf(
23 "<!DOCTYPE html>\n"
24 "<html>\n"
25 "<head>\n"
26 " <title>SkDebugger</title>\n"
27 " <meta charset='utf-8' />\n"
28 " <meta http-equiv='X-UA-Compatible' content='IE=edge'>\n"
29 " <meta name='viewport' content='width=device-width, initial-scale=1.0'>\n"
30 " <script src='%s/res/js/core.js' type='text/javascript' charset='utf-8'></script>\n"
31 " <link href='%s/res/vul/elements.html' rel='import' />\n"
32 " <link rel='shortcut icon' href='%s/res/img/favicon.ico' type='image/x-icon'/ >"
33 "</head>\n"
34 "<body class='fullbleed layout vertical'>\n"
35 " <debugger-app-sk>This is the app."
36 " </debugger-app-sk>\n"
37 "</body>\n"
38 "</html>", source.c_str(), source.c_str(), source.c_str());
39 return debuggerTemplate;
40}
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
Definition: SkString.cpp:550
SkBitmap source
Definition: examples.cpp:28