option optimize_for = SPEED;
option cc_generic_services = false;

message CMsgKeyUp {
	optional uint32 browser_handle = 1;
	optional uint32 keyCode = 2;
	optional uint32 modifiers = 3;
}

message CMsgKeyDown {
	optional uint32 browser_handle = 1;
	optional uint32 keyCode = 2;
	optional uint32 modifiers = 3;
}

message CMsgKeyChar {
	optional uint32 browser_handle = 1;
	optional uint32 unichar = 2;
}

message CMsgMouseDown {
	optional uint32 browser_handle = 1;
	optional uint32 mouse_button = 2;
}

message CMsgMouseUp {
	optional uint32 browser_handle = 1;
	optional uint32 mouse_button = 2;
}

message CMsgMouseDblClick {
	optional uint32 browser_handle = 1;
	optional uint32 mouse_button = 2;
}

message CMsgMouseWheel {
	optional uint32 browser_handle = 1;
	optional int32 delta = 2;
}

message CMsgMouseMove {
	optional uint32 browser_handle = 1;
	optional int32 x = 2;
	optional int32 y = 3;
}

message CMsgMouseLeave {
	optional uint32 browser_handle = 1;
}

message CMsgBrowserCreate {
	optional uint32 request_id = 1;
	optional bool popup = 2 [default = false];
	optional string useragent = 3;
}

message CMsgBrowserCreateResponse {
	optional uint32 browser_handle = 1;
	optional uint32 request_id = 2;
}

message CMsgBrowserRemove {
	optional uint32 browser_handle = 1;
}

message CMsgBrowserErrorStrings {
	optional uint32 browser_handle = 1;
	optional string title = 2;
	optional string header = 3;
	optional string cache_miss = 4;
	optional string bad_url = 5;
	optional string connection_problem = 6;
	optional string proxy_problem = 7;
	optional string unknown = 8;
}

message CMsgBrowserSize {
	optional uint32 browser_handle = 1;
	optional uint32 width = 2;
	optional uint32 height = 3;
}

message CMsgBrowserPosition {
	optional uint32 browser_handle = 1;
	optional uint32 x = 2;
	optional uint32 y = 3;
}

message CMsgPostURL {
	optional uint32 browser_handle = 1;
	optional string url = 2;
	optional string post = 3;
	optional uint32 pageserial = 4;
}

message CMsgAddHeader {
	optional uint32 browser_handle = 1;
	optional string key = 2;
	optional string value = 3;
}

message CMsgStopLoad {
	optional uint32 browser_handle = 1;
}

message CMsgReload {
	optional uint32 browser_handle = 1;
}

message CMsgGoForward {
	optional uint32 browser_handle = 1;
}

message CMsgGoBack {
	optional uint32 browser_handle = 1;
}

message CMsgCopy {
	optional uint32 browser_handle = 1;
}

message CMsgPaste {
	optional uint32 browser_handle = 1;
}

message CMsgExecuteJavaScript {
	optional uint32 browser_handle = 1;
	optional string script = 2;
}

message CMsgSetFocus {
	optional uint32 browser_handle = 1;
	optional bool focus = 2;
}

message CMsgHorizontalScrollBarSize {
	optional uint32 browser_handle = 1;
}

message CMsgHorizontalScrollBarSizeResponse {
	optional uint32 browser_handle = 1;
	optional uint32 x = 2;
	optional uint32 y = 3;
	optional uint32 wide = 4;
	optional uint32 tall = 5;
	optional uint32 scroll_max = 6;
	optional uint32 scroll = 7;
	optional float zoom = 8;
	optional bool visible = 9;
}

message CMsgVerticalScrollBarSize {
	optional uint32 browser_handle = 1;
}

message CMsgVerticalScrollBarSizeResponse {
	optional uint32 browser_handle = 1;
	optional uint32 x = 2;
	optional uint32 y = 3;
	optional uint32 wide = 4;
	optional uint32 tall = 5;
	optional uint32 scroll_max = 6;
	optional uint32 scroll = 7;
	optional float zoom = 8;
	optional bool visible = 9;
}

message CMsgFind {
	optional uint32 browser_handle = 1;
	optional string find = 2;
	optional bool infind = 3;
	optional bool reverse = 4 [default = false];
}

message CMsgStopFind {
	optional uint32 browser_handle = 1;
}

message CMsgSetHorizontalScroll {
	optional uint32 browser_handle = 1;
	optional uint32 scroll = 2;
}

message CMsgSetVerticalScroll {
	optional uint32 browser_handle = 1;
	optional uint32 scroll = 2;
}

message CMsgSetZoomLevel {
	optional uint32 browser_handle = 1;
	optional uint32 zoom = 2;
}

message CMsgViewSource {
	optional uint32 browser_handle = 1;
}

message CMsgBrowserReady {
	optional uint32 browser_handle = 1;
}

message CMsgURLChanged {
	optional uint32 browser_handle = 1;
	optional string url = 2;
	optional string postData = 3;
	optional bool bIsRedirect = 4;
	optional string pagetitle = 5;
	optional bool bNewNavigation = 6;
}

message CHTMLHeader {
	optional string key = 1;
	optional string value = 2;
}

message CHTMLPageSecurityInfo {
	optional bool bIsSecure = 1 [default = false];
	optional bool bHasCertError = 2 [default = false];
	optional string issuerName = 3;
	optional string certName = 4;
	optional int32 certExpiry = 5 [default = 0];
	optional int32 nCertBits = 6 [default = 0];
	optional bool bIsEVCert = 7 [default = false];
}

message CMsgFinishedRequest {
	optional uint32 browser_handle = 1;
	optional string url = 2;
	optional string pageTitle = 3;
	optional .CHTMLPageSecurityInfo security_info = 4;
	repeated .CHTMLHeader headers = 5;
}

message CMsgStartRequest {
	optional uint32 browser_handle = 1;
	optional string url = 2;
	optional string target = 3;
	optional string postData = 4;
	optional bool bIsRedirect = 5;
}

message CMsgStartRequestResponse {
	optional uint32 browser_handle = 1;
	optional bool bAllow = 2;
}

message CMsgShowPopup {
	optional uint32 browser_handle = 1;
}

message CMsgHidePopup {
	optional uint32 browser_handle = 1;
}

message CMsgSizePopup {
	optional uint32 browser_handle = 1;
	optional uint32 x = 2;
	optional uint32 y = 3;
	optional uint32 wide = 4;
	optional uint32 tall = 5;
}

message CMsgOpenNewTab {
	optional uint32 browser_handle = 1;
	optional string url = 2;
	optional bool bForeground = 3;
}

message CMsgOpenNewTabResponse {
	optional uint32 browser_handle = 1;
	optional bool bAllow = 2;
}

message CMsgPopupHTMLWindow {
	optional uint32 browser_handle = 1;
	optional string url = 2;
	optional uint32 x = 3;
	optional uint32 y = 4;
	optional uint32 wide = 5;
	optional uint32 tall = 6;
}

message CMsgPopupHTMLWindowResponse {
	optional uint32 browser_handle = 1;
	optional bool bAllow = 2;
}

message CMsgSetHTMLTitle {
	optional uint32 browser_handle = 1;
	optional string title = 2;
}

message CMsgLoadingResource {
	optional uint32 browser_handle = 1;
	optional string url = 2;
}

message CMsgStatusText {
	optional uint32 browser_handle = 1;
	optional string text = 2;
}

message CMsgSetCursor {
	optional uint32 browser_handle = 1;
	optional uint32 cursor = 2;
	optional uint32 data = 3;
	optional uint32 wide = 4;
	optional uint32 tall = 5;
	optional uint32 xhotspot = 6;
	optional uint32 yhotspot = 7;
}

message CMsgFileLoadDialog {
	optional uint32 browser_handle = 1;
	optional string title = 2;
	optional string initialFile = 3;
}

message CMsgFileLoadDialogResponse {
	optional uint32 browser_handle = 1;
	repeated string files = 2;
}

message CMsgShowToolTip {
	optional uint32 browser_handle = 1;
	optional string text = 2;
}

message CMsgUpdateToolTip {
	optional uint32 browser_handle = 1;
	optional string text = 2;
}

message CMsgHideToolTip {
	optional uint32 browser_handle = 1;
}

message CMsgSearchResults {
	optional uint32 browser_handle = 1;
	optional int32 activeMatch = 2;
	optional int32 results = 3;
}

message CMsgClose {
	optional uint32 browser_handle = 1;
}

message CMsgNeedsPaint {
	optional uint32 browser_handle = 1;
	optional uint64 rgba = 2;
	optional uint32 wide = 3;
	optional uint32 tall = 4;
	optional uint32 textureid = 5;
	optional uint32 updatex = 6;
	optional uint32 updatey = 7;
	optional uint32 updatewide = 8;
	optional uint32 updatetall = 9;
	optional uint32 scrollx = 10;
	optional uint32 scrolly = 11;
	optional uint64 combobox_rgba = 12 [default = 0];
	optional uint32 combobox_wide = 13 [default = 0];
	optional uint32 combobox_tall = 14 [default = 0];
	optional uint32 pageserial = 15;
}

message CMsgNeedsPaintResponse {
	optional uint32 browser_handle = 1;
	optional uint32 textureid = 2;
}

message CMsgGetZoom {
	optional uint32 browser_handle = 1;
}

message CMsgGetZoomResponse {
	optional uint32 browser_handle = 1;
	optional float zoom = 2;
}

message CMsgLinkAtPosition {
	optional uint32 browser_handle = 1;
	optional uint32 x = 2;
	optional uint32 y = 3;
}

message CMsgLinkAtPositionResponse {
	optional uint32 browser_handle = 1;
	optional uint32 x = 2;
	optional uint32 y = 3;
	optional string url = 4;
	optional bool blivelink = 5;
	optional bool binput = 6;
}

message CMsgZoomToElementAtPosition {
	optional uint32 browser_handle = 1;
	optional uint32 x = 2;
	optional uint32 y = 3;
}

message CMsgZoomToElementAtPositionResponse {
	optional uint32 browser_handle = 1;
	optional sint32 initial_x = 2;
	optional sint32 initial_y = 3;
	optional uint32 initial_width = 4;
	optional uint32 initial_height = 5;
	optional sint32 final_x = 6;
	optional sint32 final_y = 7;
	optional uint32 final_width = 8;
	optional uint32 final_height = 9;
	optional float zoom = 10;
}

message CMsgScalePageToValue {
	optional uint32 browser_handle = 1;
	optional float scale = 2;
	optional float x = 3;
	optional float y = 4;
}

message CMsgScalePageToValueResponse {
	optional uint32 browser_handle = 1;
	optional float zoom = 2;
	optional int32 width_delta = 3;
	optional int32 height_delta = 4;
}

message CMsgSavePageToJPEG {
	optional uint32 browser_handle = 1;
	optional string url = 2;
	optional string filename = 3;
	optional uint32 width = 4;
	optional uint32 height = 5;
}

message CMsgSavePageToJPEGResponse {
	optional uint32 browser_handle = 1;
	optional string url = 2;
	optional string filename = 3;
}

message CMsgJSAlert {
	optional uint32 browser_handle = 1;
	optional string message = 2;
}

message CMsgJSConfirm {
	optional uint32 browser_handle = 1;
	optional string message = 2;
}

message CMsgJSDialogResponse {
	optional uint32 browser_handle = 1;
	optional bool result = 2;
}

message CMsgCanGoBackAndForward {
	optional uint32 browser_handle = 1;
	optional bool bgoback = 2;
	optional bool bgoforward = 3;
}

message CMsgOpenSteamURL {
	optional uint32 browser_handle = 1;
	optional string url = 2;
}

message CMsgSetCookie {
	optional string key = 1;
	optional string value = 2;
	optional string path = 3;
	optional string host = 4;
	optional uint32 expires = 5;
}

message CMsgSetTargetFrameRate {
	optional uint32 nTargetFrameRate = 1;
}

message CMsgFullRepaint {
	optional uint32 browser_handle = 1;
}

message CMsgRequestFullScreen {
	optional uint32 browser_handle = 1;
}

message CMsgRequestFullScreenResponse {
	optional uint32 browser_handle = 1;
	optional bool ballow = 2;
}

message CMsgExitFullScreen {
	optional uint32 browser_handle = 1;
}

message CMsgGetCookiesForURL {
	optional uint32 browser_handle = 1;
	optional string url = 2;
}

message CCookie {
	optional string name = 1;
	optional string value = 2;
	optional string domain = 3;
	optional string path = 4;
}

message CMsgGetCookiesForURLResponse {
	optional uint32 browser_handle = 1;
	optional string url = 2;
	repeated .CCookie cookies = 3;
}

message CMsgNodeHasFocus {
	optional uint32 browser_handle = 1;
	optional bool bInput = 2;
	optional string name = 3;
	optional string elementtagname = 4;
	optional string searchbuttontext = 5;
	optional bool bHasMultipleInputs = 6;
	optional string input_type = 7;
}

message CMsgZoomToFocusedElement {
	optional uint32 browser_handle = 1;
	optional uint32 leftoffset = 2 [default = 0];
	optional uint32 topoffset = 3 [default = 0];
}

message CMsgCloseFullScreenFlashIfOpen {
	optional uint32 browser_handle = 1;
}

message CMsgPauseFullScreenFlashMovieIfOpen {
	optional uint32 browser_handle = 1;
}

message CMsgFocusedNodeText {
	optional uint32 browser_handle = 1;
}

message CMsgFocusedNodeTextResponse {
	optional uint32 browser_handle = 1;
	optional string value = 2;
}
