aboutsummaryrefslogtreecommitdiff
path: root/mp/src/vgui2/chromehtml
diff options
context:
space:
mode:
authorNarendra Umate <[email protected]>2013-12-08 01:27:41 -0800
committerNarendra Umate <[email protected]>2013-12-08 01:27:41 -0800
commit4fa56874ba1557274c10077bf8386ece4c61dbd6 (patch)
treee2d336604e960b548e996d2e7dcfc5a1e1401b9e /mp/src/vgui2/chromehtml
parentAdded DS_Store to .gitignore. (diff)
parentMake libSDL2.so/dylib into symlinks. (diff)
downloadsource-sdk-2013-4fa56874ba1557274c10077bf8386ece4c61dbd6.tar.xz
source-sdk-2013-4fa56874ba1557274c10077bf8386ece4c61dbd6.zip
Merge remote-tracking branch 'upstream/master'
Reverted .gitattributes xcode_ccache_wrapper change. Fixed line endings for .gitignore and .gitattributes.
Diffstat (limited to 'mp/src/vgui2/chromehtml')
-rw-r--r--mp/src/vgui2/chromehtml/html_chrome.cpp270
-rw-r--r--mp/src/vgui2/chromehtml/html_mac.mm30
-rw-r--r--mp/src/vgui2/chromehtml/htmlmessages.proto2050
3 files changed, 1195 insertions, 1155 deletions
diff --git a/mp/src/vgui2/chromehtml/html_chrome.cpp b/mp/src/vgui2/chromehtml/html_chrome.cpp
index 89874400..37ba4f74 100644
--- a/mp/src/vgui2/chromehtml/html_chrome.cpp
+++ b/mp/src/vgui2/chromehtml/html_chrome.cpp
@@ -111,18 +111,18 @@ void CCEFThread::WakeThread()
//-----------------------------------------------------------------------------
#define HTML_MSG_FUNC( eHTMLCommand, bodyType, commandFunc ) \
case eHTMLCommand: \
- { \
- CHTMLProtoBufMsg< bodyType > cmd( pCmd->m_eCmd ); \
- if ( !cmd.BDeserializeCrossProc( &pCmd->m_Buffer ) ) \
- { \
- bError = true; \
- } \
+{ \
+ CHTMLProtoBufMsg< bodyType > cmd( pCmd->m_eCmd ); \
+ if ( !cmd.BDeserializeCrossProc( &pCmd->m_Buffer ) ) \
+{ \
+ bError = true; \
+} \
else \
- { \
+{ \
cmd.Body().set_browser_handle( pCmd->m_iBrowser ); \
- g_CEFThread.commandFunc( cmd ); \
- } \
- } \
+ g_CEFThread.commandFunc( cmd ); \
+} \
+} \
break;
@@ -204,7 +204,7 @@ void CCEFThread::RunCurrentCommands()
HTML_MSG_FUNC( eHTMLCommands_ExitFullScreen, CMsgExitFullScreen, ThreadExitFullScreen );
HTML_MSG_FUNC( eHTMLCommands_CloseFullScreenFlashIfOpen, CMsgCloseFullScreenFlashIfOpen, ThreadCloseFullScreenFlashIfOpen );
HTML_MSG_FUNC( eHTMLCommands_PauseFullScreenFlashMovieIfOpen, CMsgPauseFullScreenFlashMovieIfOpen, ThreadPauseFullScreenFlashMovieIfOpen );
-
+
default:
bError = true;
AssertMsg1( false, "Invalid message in browser stream (%d)", pCmd->m_eCmd );
@@ -351,7 +351,7 @@ bool CCEFThread::GetMainThreadCommand( HTMLCommandBuffer_t **pBuf )
return true;
}
else
- return m_tslResponseBuffers.PopItem( pBuf );
+ return m_tslResponseBuffers.PopItem( pBuf );
}
@@ -376,7 +376,7 @@ bool CCEFThread::GetCEFThreadCommand( HTMLCommandBuffer_t **pBuf )
//-----------------------------------------------------------------------------
const char *CCEFThread::PchWebkitUserAgent()
{
- return "Mozilla/5.0 (%s; U; %s; en-US; %s/%llu; %s) AppleWebKit/535.15 (KHTML, like Gecko) Chrome/18.0.989.0 Safari/535.11";
+ return "Mozilla/5.0 (%s; U; %s; en-US; %s/%llu; %s) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19";
}
@@ -405,7 +405,6 @@ void CCEFThread::ThreadCreateBrowser( const CHTMLProtoBufMsg<CMsgBrowserCreate>
CefWindowInfo info;
info.SetAsOffScreen( NULL );
info.m_bPopupWindow = htmlCommand.BodyConst().popup();
-
CefBrowserSettings settings;
settings.fullscreen_enabled = true;
settings.threaded_compositing_enabled = true;
@@ -421,6 +420,28 @@ void CCEFThread::ThreadCreateBrowser( const CHTMLProtoBufMsg<CMsgBrowserCreate>
settings.webgl_disabled = true;
#endif
+ // CEF HTML local storage, databases, and offline application cache are all busted;
+ // they live in a temp dir which gets cleaned up on shutdown. There's no point in
+ // enabling them just to generate extra files to cleanup on shutdown when there's
+ // no actual disk persistence. we need to upgrade CEF again before they will work.
+ settings.local_storage_disabled = true;
+ settings.databases_disabled = true;
+ settings.application_cache_disabled = true;
+ settings.java_disabled = true;
+
+ // We don't provide a UI to connect to the WebKit developer tools API
+ // so there is no point having it suck up CPU and listening on a port.
+ settings.developer_tools_disabled = true;
+
+ // Drag and drop is supposed to be disabled automatically for offscreen views, but
+ // ports for Mac and Linux have bugs where it is not really disabled, causing havoc
+ settings.drag_drop_disabled = true;
+
+#ifdef LINUX
+ // Turn off web features here that don't work on Linux
+ settings.webgl_disabled = true;
+#endif
+
CefBrowser::CreateBrowserSync( info, pBrowser, "", settings );
CefDoMessageLoopWork();
}
@@ -479,7 +500,7 @@ void CCEFThread::ThreadBrowserSize( const CHTMLProtoBufMsg<CMsgBrowserSize> &htm
GET_BROSWER_FUNC( htmlCommand, SetSize( PET_VIEW, htmlCommand.BodyConst().width(), htmlCommand.BodyConst().height() ) );
if ( BIsValidBrowserHandle( htmlCommand.BodyConst().browser_handle(), iClient ) )
m_listClientHandlers[iClient]->SetSize( htmlCommand.BodyConst().width(), htmlCommand.BodyConst().height() );
-}
+ }
//-----------------------------------------------------------------------------
@@ -646,8 +667,8 @@ void CCEFThread::ThreadBrowserHorizontalScrollBarSizeHelper( int iBrowser, bool
if ( bForceSendUpdate || 0 != memcmp( &pHandler->m_CachedHScroll, &scroll, sizeof( scroll ) ) )
{
pHandler->m_CachedHScroll = scroll;
-
- CHTMLProtoBufMsg<CMsgHorizontalScrollBarSizeResponse> cmd( eHTMLCommands_HorizontalScrollBarSizeResponse );
+
+ CHTMLProtoBufMsg<CMsgHorizontalScrollBarSizeResponse> cmd( eHTMLCommands_HorizontalScrollBarSizeResponse );
cmd.Body().set_x( scroll.m_nX );
cmd.Body().set_y( scroll.m_nY );
cmd.Body().set_wide( scroll.m_nWide );
@@ -655,10 +676,10 @@ void CCEFThread::ThreadBrowserHorizontalScrollBarSizeHelper( int iBrowser, bool
cmd.Body().set_scroll_max( scroll.m_nMax );
cmd.Body().set_scroll( scroll.m_nScroll );
cmd.Body().set_visible( scroll.m_bVisible != 0 );
- cmd.Body().set_zoom( flZoom );
- int m_iBrowser = iBrowser;
- DISPATCH_MESSAGE( eHTMLCommands_HorizontalScrollBarSizeResponse );
- }
+ cmd.Body().set_zoom( flZoom );
+ int m_iBrowser = iBrowser;
+ DISPATCH_MESSAGE( eHTMLCommands_HorizontalScrollBarSizeResponse );
+}
}
}
@@ -701,7 +722,7 @@ void CCEFThread::ThreadBrowserVerticalScrollBarSizeHelper( int iBrowser, bool bF
{
pHandler->m_CachedVScroll = scroll;
- CHTMLProtoBufMsg<CMsgVerticalScrollBarSizeResponse> cmd( eHTMLCommands_VerticalScrollBarSizeResponse );
+ CHTMLProtoBufMsg<CMsgVerticalScrollBarSizeResponse> cmd( eHTMLCommands_VerticalScrollBarSizeResponse );
cmd.Body().set_x( scroll.m_nX );
cmd.Body().set_y( scroll.m_nY );
cmd.Body().set_wide( scroll.m_nWide );
@@ -709,10 +730,10 @@ void CCEFThread::ThreadBrowserVerticalScrollBarSizeHelper( int iBrowser, bool bF
cmd.Body().set_scroll_max( scroll.m_nMax );
cmd.Body().set_scroll( scroll.m_nScroll );
cmd.Body().set_visible( scroll.m_bVisible != 0 );
- cmd.Body().set_zoom( flZoom );
- int m_iBrowser = iBrowser;
- DISPATCH_MESSAGE( eHTMLCommands_VerticalScrollBarSizeResponse );
- }
+ cmd.Body().set_zoom( flZoom );
+ int m_iBrowser = iBrowser;
+ DISPATCH_MESSAGE( eHTMLCommands_VerticalScrollBarSizeResponse );
+}
}
}
@@ -743,7 +764,7 @@ void CCEFThread::ThreadBrowserSetHorizontalScroll( const CHTMLProtoBufMsg<CMsgSe
GET_BROSWER_FUNC( htmlCommand, SetHorizontalScroll( htmlCommand.BodyConst().scroll() ) );
ThreadBrowserHorizontalScrollBarSizeHelper( htmlCommand.BodyConst().browser_handle(), true );
-}
+ }
//-----------------------------------------------------------------------------
@@ -851,7 +872,7 @@ void CCEFThread::ThreadGetZoom( const CHTMLProtoBufMsg<CMsgGetZoom> &htmlCmd )
//-----------------------------------------------------------------------------
void IOT_SetCookie(const CefString& url, CefCookie* cookie, CThreadEvent *pEvent )
{
- CefSetCookie(url, *cookie);
+ CefCookieManager::GetGlobalManager()->SetCookie(url, *cookie);
pEvent->Set();
}
@@ -936,7 +957,7 @@ private:
//-----------------------------------------------------------------------------
void IOT_CookiesForURL(const CefString& url, CThreadEvent *pEvent, CUtlVector<CCefCookie> *pVecCookies )
{
- CefVisitUrlCookies( url, false, new CookieVisitor( pVecCookies, pEvent ) );
+ CefCookieManager::GetGlobalManager()->VisitUrlCookies( url, false, new CookieVisitor( pVecCookies, pEvent ) );
}
@@ -1029,7 +1050,6 @@ void CCEFThread::AppGetSettings(CefSettings& settings, CefRefPtr<CefApp>& app)
//#endif
}
-
//-----------------------------------------------------------------------------
// Purpose: clean up the temp folders cef can leave around on crash
//-----------------------------------------------------------------------------
@@ -1092,12 +1112,13 @@ int CCEFThread::Run()
// Populate the settings based on command line arguments.
AppGetSettings(settings, app);
+ settings.pack_loading_disabled = true;
// Initialize CEF.
CefInitialize(settings, app, "");
#if defined( VPROF_ENABLED )
- //CVProfile *pProfile = GetVProfProfileForCurrentThread();
+// CVProfile *pProfile = GetVProfProfileForCurrentThread();
#endif
CLimitTimer timer;
@@ -1125,8 +1146,8 @@ int CCEFThread::Run()
m_bSawUserInputThisFrame = false;
#if defined( VPROF_ENABLED )
- //if ( pProfile )
- // pProfile->MarkFrame( "UI CEF HTML Thread" );
+// if ( pProfile )
+// pProfile->MarkFrame( "UI CEF HTML Thread" );
#endif
// Limit animation frame rate
timer.SetLimit( k_nMillion/m_nTargetFrameRate );
@@ -1138,7 +1159,7 @@ int CCEFThread::Run()
}
// now let cef think
- if ( m_listClientHandlers.Count() || timerLastCefThink.BLimitReached() )
+ if ( !m_bExit && ( m_listClientHandlers.Count() || timerLastCefThink.BLimitReached() ) && m_nTargetFrameRate > 0 )
{
VPROF_BUDGET( "CCEFThread - CefDoMessageLoopWork()", VPROF_BUDGETGROUP_TENFOOT );
CefDoMessageLoopWork();
@@ -1314,7 +1335,7 @@ void CCEFThread::CheckForFullScreenFlashControl()
}
SetForegroundWindow( m_flashfullscreenHWND );
- }
+ }
}
else
{
@@ -1360,40 +1381,40 @@ void CCEFThread::Validate( CValidator &validator, const tchar *pchName )
// hacky but reliable way to avoid both vgui and panorama validating all this stuff twice
if ( !validator.IsClaimed( m_sHTMLCacheDir.Access() ) )
{
- VALIDATE_SCOPE();
- ValidateObj( m_sHTMLCacheDir );
- ValidateObj( m_sCookiePath );
- ValidateObj( m_listClientHandlers );
- FOR_EACH_LL( m_listClientHandlers, i )
- {
- ValidatePtr( m_listClientHandlers[i] );
- }
- ValidateObj( m_vecQueueCommands );
- FOR_EACH_VEC( m_vecQueueCommands, i )
- {
- ValidatePtr( m_vecQueueCommands[i] );
- }
+ VALIDATE_SCOPE();
+ ValidateObj( m_sHTMLCacheDir );
+ ValidateObj( m_sCookiePath );
+ ValidateObj( m_listClientHandlers );
+ FOR_EACH_LL( m_listClientHandlers, i )
+ {
+ ValidatePtr( m_listClientHandlers[i] );
+ }
+ ValidateObj( m_vecQueueCommands );
+ FOR_EACH_VEC( m_vecQueueCommands, i )
+ {
+ ValidatePtr( m_vecQueueCommands[i] );
+ }
ValidateObj( m_vecQueueResponses );
FOR_EACH_VEC( m_vecQueueResponses, i )
{
ValidatePtr( m_vecQueueResponses[i] );
}
- ValidateObj( m_tslUnsedBuffers );
+ ValidateObj( m_tslUnsedBuffers );
+ {
+ CTSList<HTMLCommandBuffer_t*>::Node_t *pNode = m_tslUnsedBuffers.Detach();
+ while ( pNode )
{
- CTSList<HTMLCommandBuffer_t*>::Node_t *pNode = m_tslUnsedBuffers.Detach();
- while ( pNode )
- {
- CTSList<HTMLCommandBuffer_t*>::Node_t *pNext = (CTSList<HTMLCommandBuffer_t*>::Node_t *)pNode->Next;
- ValidatePtr( pNode->elem );
- m_tslUnsedBuffers.Push( pNode );
- pNode = pNext;
- }
+ CTSList<HTMLCommandBuffer_t*>::Node_t *pNext = (CTSList<HTMLCommandBuffer_t*>::Node_t *)pNode->Next;
+ ValidatePtr( pNode->elem );
+ m_tslUnsedBuffers.Push( pNode );
+ pNode = pNext;
}
-
- ValidateObj( m_tslCommandBuffers );
- ValidateObj( m_tslResponseBuffers );
}
+
+ ValidateObj( m_tslCommandBuffers );
+ ValidateObj( m_tslResponseBuffers );
+}
}
#endif
@@ -1567,23 +1588,23 @@ void CChromePainter::OnPaint(CefRefPtr<CefBrowser> browser, PaintElementType typ
{
// main browser painting
- if ( !m_pParent->IsVisuallyNonEmpty() )
- {
- return;
- }
+ if ( !m_pParent->IsVisuallyNonEmpty() )
+ {
+ return;
+ }
// If there were no dirty regions (unlikely), perhaps due to a bug, be conservative and paint all
if ( dirtyRects.empty() )
- {
+ {
m_MainTexture.MarkAllDirty();
- }
- else
- {
+ }
+ else
+ {
for ( RectList::const_iterator iter = dirtyRects.begin(); iter != dirtyRects.end(); ++iter )
- {
+ {
m_MainTexture.MarkDirtyRect( iter->x, iter->y, iter->x + iter->width, iter->y + iter->height );
- }
- }
+ }
+ }
// Refresh all dirty main texture pixels from the chromium rendering buffer
if ( m_MainTexture.BUpdatePixels( (byte*)buffer, wide, tall ) )
@@ -1629,7 +1650,7 @@ void CChromePainter::SetUpdated( bool state )
// Purpose: move to the next html texture to render into
//-----------------------------------------------------------------------------
uint32 CChromePainter::FlipTexture()
-{
+{
int iTex = m_iNextTexture;
m_iTexturesInFlightBits |= ( 1<<iTex );
m_iNextTexture = (m_iNextTexture+1)%Q_ARRAYSIZE(m_Texture);
@@ -1672,19 +1693,19 @@ byte *CChromePainter::PComposedTextureData( uint32 iTexture )
// Notify the main thread that the composited popup region is dirty
m_UpdateRect.MarkDirtyRect( GetPopupX(), GetPopupY(), GetPopupX() + nCopyWide, GetPopupY() + nCopyTall );
-
+
byte *pCurTextureByte = pTexture;
pCurTextureByte += ( GetPopupY() * m_Texture[ iTexture ].GetWide() * 4 ); // move ahead to the right row
pCurTextureByte += ( GetPopupX() * 4 ); // now offset into the edge as needed
-
+
const byte *pPopupTexture = PPopupTextureData();
for ( int iRow = 0; iRow < nCopyTall; iRow++ )
- {
+{
Q_memcpy( pCurTextureByte, pPopupTexture, nCopyWide*4 );
pCurTextureByte += ( m_Texture[ iTexture ].GetWide() * 4 ); // move ahead one row in both images
pPopupTexture += ( GetPopupWide() * 4 );
}
- }
+}
return pTexture;
}
@@ -2000,34 +2021,34 @@ void CClientHandler::OnLoadStart(CefRefPtr<CefBrowser> browser,
if ( !frame->IsMain() )
return;
- std::wstring sURL = frame->GetURL();
- if ( sURL.empty() )
- return;
+ std::wstring sURL = frame->GetURL();
+ if ( sURL.empty() )
+ return;
- CStrAutoEncode url( sURL.c_str() );
- m_strCurrentUrl = url.ToString();
+ CStrAutoEncode url( sURL.c_str() );
+ m_strCurrentUrl = url.ToString();
- if ( m_strCurrentUrl.IsEmpty() )
- return;
+ if ( m_strCurrentUrl.IsEmpty() )
+ return;
- bool bIsRedirect = false;
- if ( m_strCurrentUrl == m_strLastRedirectURL )
- bIsRedirect = true;
+ bool bIsRedirect = false;
+ if ( m_strCurrentUrl == m_strLastRedirectURL )
+ bIsRedirect = true;
- CHTMLProtoBufMsg<CMsgURLChanged> cmd( eHTMLCommands_URLChanged );
- cmd.Body().set_url( url.ToString() );
+ CHTMLProtoBufMsg<CMsgURLChanged> cmd( eHTMLCommands_URLChanged );
+ cmd.Body().set_url( url.ToString() );
cmd.Body().set_bnewnavigation( bIsNewNavigation );
-
- if ( !m_strPostData.IsEmpty() )
+
+ if ( !m_strPostData.IsEmpty() )
cmd.Body().set_postdata( m_strPostData.String() );
- cmd.Body().set_bisredirect( bIsRedirect );
- CefString frameName = frame->GetName();
- if ( !frameName.empty() )
- cmd.Body().set_pagetitle( frameName.c_str() );
+ cmd.Body().set_bisredirect( bIsRedirect );
+ CefString frameName = frame->GetName();
+ if ( !frameName.empty() )
+ cmd.Body().set_pagetitle( frameName.c_str() );
- DISPATCH_MESSAGE( eHTMLCommands_URLChanged );
- }
+ DISPATCH_MESSAGE( eHTMLCommands_URLChanged );
+}
{
CHTMLProtoBufMsg<CMsgCanGoBackAndForward> cmd( eHTMLCommands_CanGoBackandForward );
@@ -2420,10 +2441,10 @@ bool CClientHandler::OnTooltip(CefRefPtr<CefBrowser> browser, CefString& text)
{
m_strToolTip = text.c_str();
- CHTMLProtoBufMsg<CMsgUpdateToolTip> cmd( eHTMLCommands_UpdateToolTip );
+ CHTMLProtoBufMsg<CMsgUpdateToolTip> cmd( eHTMLCommands_UpdateToolTip );
cmd.Body().set_text( m_strToolTip );
- DISPATCH_MESSAGE( eHTMLCommands_UpdateToolTip );
- }
+ DISPATCH_MESSAGE( eHTMLCommands_UpdateToolTip );
+ }
}
else if ( m_bShowingToolTip )
{
@@ -2612,9 +2633,9 @@ bool CChromePainter::OnFileOpenDialog( CefRefPtr<CefBrowser> browser, bool bMult
{
if ( !cmd.BodyConst().files(i).empty() )
{
- CPathString path( cmd.BodyConst().files(i).c_str() );
- files.push_back( path.GetWCharPathPrePended() );
- }
+ CPathString path( cmd.BodyConst().files(i).c_str() );
+ files.push_back( path.GetWCharPathPrePended() );
+ }
}
// if you have a DEBUG build and are crashing here it is because
@@ -2853,7 +2874,7 @@ void CClientHandler::SetMouseLocation( int nMouseX, int nMouseY )
m_nMouseScrolledY = nMouseY + m_Browser->HorizontalScroll();
m_bMouseFocus = true;
m_Browser->SendMouseMoveEvent( m_nMouseX, m_nMouseY, false );
- }
+}
}
//-----------------------------------------------------------------------------
@@ -2952,7 +2973,7 @@ const byte *CClientHandler::PComposedTextureData( uint32 iTexture )
VPROF_BUDGET( "CClientHandler::PTextureData", VPROF_BUDGETGROUP_VGUI );
return m_Painter.PComposedTextureData( iTexture );
-}
+ }
//-----------------------------------------------------------------------------
@@ -3048,12 +3069,13 @@ void CCEFThread::ThreadLinkAtPosition( const CHTMLProtoBufMsg<CMsgLinkAtPosition
{
CefString pchURL;
int iClient = 0;
- int bLiveLink = false;
- int bInput = false;
+ int bLiveLink = false;
+ int bInput = false;
if ( BIsValidBrowserHandle( htmlCommand.BodyConst().browser_handle(), iClient ) )
{
if ( m_listClientHandlers[iClient]->GetBrowser() )
- pchURL = m_listClientHandlers[iClient]->GetBrowser()->GetLinkAtPosition( htmlCommand.BodyConst().x(), htmlCommand.BodyConst().y(), bLiveLink, bInput );
+ m_listClientHandlers[iClient]->GetBrowser()->GetLinkAtPosition( htmlCommand.BodyConst().x(), htmlCommand.BodyConst().y(),
+ pchURL, bLiveLink, bInput);
}
CHTMLProtoBufMsg<CMsgLinkAtPositionResponse> cmd( eHTMLCommands_LinkAtPositionResponse );
@@ -3079,9 +3101,9 @@ void CCEFThread::ThreadZoomToElementAtPosition( const CHTMLProtoBufMsg<CMsgZoomT
if ( m_listClientHandlers[iClient]->GetBrowser() )
{
CefRect initialRect, finalRect;
- float zoomLevel = m_listClientHandlers[iClient]->GetBrowser()->scalePageToFitElementAt(
- htmlCommand.BodyConst().x(), htmlCommand.BodyConst().y(),
- initialRect, finalRect );
+ float zoomLevel = m_listClientHandlers[iClient]->GetBrowser()->scalePageToFitElementAt(
+ htmlCommand.BodyConst().x(), htmlCommand.BodyConst().y(),
+ initialRect, finalRect );
int m_iBrowser = htmlCommand.BodyConst().browser_handle();
ThreadBrowserVerticalScrollBarSizeHelper( m_iBrowser, true );
ThreadBrowserHorizontalScrollBarSizeHelper( m_iBrowser, true );
@@ -3100,7 +3122,7 @@ void CCEFThread::ThreadZoomToElementAtPosition( const CHTMLProtoBufMsg<CMsgZoomT
}
}
}
-}
+ }
//-----------------------------------------------------------------------------
@@ -3357,7 +3379,7 @@ void CCEFThread::ThreadMouseWheel( const CHTMLProtoBufMsg<CMsgMouseWheel> &htmlC
int nMouseX, nMouseY;
m_listClientHandlers[ iClient ]->GetMouseLocation( nMouseX, nMouseY );
- browser->SendMouseWheelEvent( nMouseX, nMouseY, htmlCommand.BodyConst().delta() );
+ browser->SendMouseWheelEvent( nMouseX, nMouseY, 0, htmlCommand.BodyConst().delta() );
}
}
@@ -3374,7 +3396,13 @@ void CCEFThread::ThreadKeyTyped( const CHTMLProtoBufMsg<CMsgKeyChar> &htmlComman
if ( !browser.get() )
return;
- browser->SendKeyEvent( KT_CHAR, htmlCommand.BodyConst().unichar(), 0, false, false );
+ CefKeyInfo keyInfo;
+#ifdef OSX
+ keyInfo.character = htmlCommand.BodyConst().unichar();
+#else
+ keyInfo.key = htmlCommand.BodyConst().unichar();
+#endif
+ browser->SendKeyEvent( KT_CHAR, keyInfo, 0 );
}
}
@@ -3391,7 +3419,13 @@ void CCEFThread::ThreadKeyDown( const CHTMLProtoBufMsg<CMsgKeyDown> &htmlCommand
if ( !browser.get() )
return;
- browser->SendKeyEvent( KT_KEYDOWN, htmlCommand.BodyConst().keycode(), htmlCommand.BodyConst().modifiers(), false, false );
+ CefKeyInfo keyInfo;
+#ifdef OSX
+ keyInfo.keyCode = htmlCommand.BodyConst().keycode();
+#else
+ keyInfo.key = htmlCommand.BodyConst().keycode();
+#endif
+ browser->SendKeyEvent( KT_KEYDOWN, keyInfo, htmlCommand.BodyConst().modifiers() );
}
}
@@ -3408,7 +3442,13 @@ void CCEFThread::ThreadKeyUp( const CHTMLProtoBufMsg<CMsgKeyUp> &htmlCommand )
if ( !browser.get() )
return;
- browser->SendKeyEvent( KT_KEYUP, htmlCommand.BodyConst().keycode(), htmlCommand.BodyConst().modifiers(), false, false );
+ CefKeyInfo keyInfo;
+#ifdef OSX
+ keyInfo.keyCode = htmlCommand.BodyConst().keycode();
+#else
+ keyInfo.key = htmlCommand.BodyConst().keycode();
+#endif
+ browser->SendKeyEvent( KT_KEYUP, keyInfo, htmlCommand.BodyConst().modifiers() );
}
}
diff --git a/mp/src/vgui2/chromehtml/html_mac.mm b/mp/src/vgui2/chromehtml/html_mac.mm
index f85f091a..6feb9046 100644
--- a/mp/src/vgui2/chromehtml/html_mac.mm
+++ b/mp/src/vgui2/chromehtml/html_mac.mm
@@ -1,16 +1,16 @@
-//=========== Copyright Valve Corporation, All rights reserved. ===============//
-//
-// Purpose:
-//=============================================================================//
-
-#include <Cocoa/Cocoa.h>
-
-extern "C" void *CreateAutoReleasePool()
-{
- return [[NSAutoreleasePool alloc] init];
-}
-
-extern "C" void ReleaseAutoReleasePool( void *pool )
-{
- [pool release];
+//=========== Copyright Valve Corporation, All rights reserved. ===============//
+//
+// Purpose:
+//=============================================================================//
+
+#include <Cocoa/Cocoa.h>
+
+extern "C" void *CreateAutoReleasePool()
+{
+ return [[NSAutoreleasePool alloc] init];
+}
+
+extern "C" void ReleaseAutoReleasePool( void *pool )
+{
+ [pool release];
} \ No newline at end of file
diff --git a/mp/src/vgui2/chromehtml/htmlmessages.proto b/mp/src/vgui2/chromehtml/htmlmessages.proto
index 355f0942..6ad706ef 100644
--- a/mp/src/vgui2/chromehtml/htmlmessages.proto
+++ b/mp/src/vgui2/chromehtml/htmlmessages.proto
@@ -1,1025 +1,1025 @@
-//====== Copyright 1996-2010, Valve Corporation, All rights reserved. =======
-//
-// Purpose: The file defines our Google Protocol Buffers which are used in IPC
-// and inter-thread communcations in the tenfoot UI rendering system.
-//
-//=============================================================================
-
-// We care more about speed than code size
-option optimize_for = SPEED;
-
-// We don't use the service generation functionality
-option cc_generic_services = false;
-
-//
-// STYLE NOTES:
-//
-// Use CamelCase CMsgMyMessageName style names for messages.
-//
-// Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
-// but plays nice with the Google formatted code generation.
-//
-// Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
-// Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
-// your message and wants to remove or rename fields. This is especially important for messages sent from the server
-// to clients. We may be able to safely remove a field if it's optional even if an old client expects it, but if it
-// was required we can't remove it. Using required doesn't really offer any advantages at all as you'll just end up
-// with an empty message with all default values if you receive a message missing a required field, so there is no
-// real advantage to using it ever.
-//
-// Use fixed64 for JobId_t, GID_t, or SteamID or GameID. This is appropriate for any field that is normally
-// going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
-// than 2^56 as it will safe space on the wire in those cases.
-//
-// Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
-// 2^28. It will safe space in those cases, otherwise use int32 which will safe space for smaller values.
-// An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
-// time.
-//
-// Use uint32 with [default = 2] for EResult values in messages. The default is important since the normal int/uint
-// default of 0 is not a valid EResult value. 2 is k_EResultFail.
-//
-// See: http://code.google.com/apis/protocolbuffers/docs/proto.html for a complete language guide.
-//
-
-
-//
-// key up - eHTMLCommands_KeyUp
-//
-message CMsgKeyUp
-{
- optional uint32 browser_handle = 1;
- optional uint32 keyCode = 2;
- optional uint32 modifiers = 3;
-}
-
-
-//
-// key down - eHTMLCommands_KeyDown
-//
-message CMsgKeyDown
-{
- optional uint32 browser_handle = 1;
- optional uint32 keyCode = 2;
- optional uint32 modifiers = 3;
-}
-
-
-//
-// key unichar - eHTMLCommands_KeyChar
-//
-message CMsgKeyChar
-{
- optional uint32 browser_handle = 1;
- optional uint32 unichar = 2;
-}
-
-
-//
-// mouse down - eHTMLCommands_MouseDown
-//
-message CMsgMouseDown
-{
- optional uint32 browser_handle = 1;
- optional uint32 mouse_button = 2;
-}
-
-
-//
-// mouse up - eHTMLCommands_MouseUp
-//
-message CMsgMouseUp
-{
- optional uint32 browser_handle = 1;
- optional uint32 mouse_button = 2;
-}
-
-
-//
-// mouse dbl click - eHTMLCommands_MouseDblClick
-//
-message CMsgMouseDblClick
-{
- optional uint32 browser_handle = 1;
- optional uint32 mouse_button = 2;
-}
-
-
-//
-// mouse wheel - eHTMLCommands_MouseWheel
-//
-message CMsgMouseWheel
-{
- optional uint32 browser_handle = 1;
- optional int32 delta = 2;
-}
-
-
-//
-// mouse move - eHTMLCommands_MouseMove
-//
-message CMsgMouseMove
-{
- optional uint32 browser_handle = 1;
- optional int32 x = 2;
- optional int32 y = 3;
-}
-
-
-//
-// mouse leave - eHTMLCommands_MouseLeave
-//
-message CMsgMouseLeave
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// make a cef control - eHTMLCommands_BrowserCreate
-//
-message CMsgBrowserCreate
-{
- optional uint32 request_id = 1;
- optional bool popup = 2 [default = false];
- optional string useragent = 3;
-}
-
-
-//
-// ack to the main thread a control was made - eHTMLCommands_BrowserCreateResponse
-//
-message CMsgBrowserCreateResponse
-{
- optional uint32 browser_handle = 1;
- optional uint32 request_id = 2;
-}
-
-
-//
-// delete a browser - eHTMLCommands_BrowserRemove
-//
-message CMsgBrowserRemove
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// send loc strings over to use for error page - eHTMLCommands_BrowserErrorStrings
-//
-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;
-}
-
-
-//
-// Set a browser to this size - eHTMLCommands_BrowserSize
-//
-message CMsgBrowserSize
-{
- optional uint32 browser_handle = 1;
- optional uint32 width = 2;
- optional uint32 height = 3;
-}
-
-
-//
-// Set position in the window - eHTMLCommands_BrowserPosition
-//
-message CMsgBrowserPosition
-{
- optional uint32 browser_handle = 1;
- optional uint32 x = 2;
- optional uint32 y = 3;
-}
-
-
-//
-// load this url - eHTMLCommands_PostURL
-//
-message CMsgPostURL
-{
- optional uint32 browser_handle = 1;
- optional string url = 2;
- optional string post = 3;
- optional uint32 pageserial = 4;
-}
-
-
-//
-// have cef send this html header for all page loads -eHTMLCommands_AddHeader
-//
-message CMsgAddHeader
-{
- optional uint32 browser_handle = 1;
- optional string key = 2;
- optional string value = 3;
-}
-
-
-//
-// stop loading a page - eHTMLCommands_StopLoad
-//
-message CMsgStopLoad
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// reload a page - eHTMLCommands_Reload
-//
-message CMsgReload
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// next page - eHTMLCommands_GoForward
-//
-message CMsgGoForward
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// back a page in the stack - eHTMLCommands_GoBack
-//
-message CMsgGoBack
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// copy the currently selected text - eHTMLCommands_Copy
-//
-message CMsgCopy
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// paste text here from the clipboard - eHTMLCommands_Paste
-//
-message CMsgPaste
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// run this javascript on the current page - eHTMLCommands_ExecuteJavaScript
-//
-message CMsgExecuteJavaScript
-{
- optional uint32 browser_handle = 1;
- optional string script = 2;
-}
-
-
-//
-// tell it that it has key focus - eHTMLCommands_SetFocus
-//
-message CMsgSetFocus
-{
- optional uint32 browser_handle = 1;
- optional bool focus = 2;
-}
-
-
-//
-// how big is the scroll bar plz - eHTMLCommands_HorizontalScrollBarSize
-//
-message CMsgHorizontalScrollBarSize
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// its this big! - eHTMLCommands_HorizontalScrollBarSizeResponse
-//
-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;
-}
-
-
-//
-// eHTMLCommands_VerticalScrollBarSize
-//
-message CMsgVerticalScrollBarSize
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// eHTMLCommands_VerticalScrollBarSizeResponse
-//
-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;
-}
-
-
-//
-// find this string in the page - eHTMLCommands_Find
-//
-message CMsgFind
-{
- optional uint32 browser_handle = 1;
- optional string find = 2;
- optional bool infind = 3;
- optional bool reverse = 4 [ default = false ];
-}
-
-//
-// done finding - eHTMLCommands_StopFind
-//
-message CMsgStopFind
-{
- optional uint32 browser_handle = 1;
-}
-
-//
-// scroll here - eHTMLCommands_SetHorizontalScroll
-//
-message CMsgSetHorizontalScroll
-{
- optional uint32 browser_handle = 1;
- optional uint32 scroll = 2;
-}
-
-
-//
-// scroll here - eHTMLCommands_SetHorizontalScroll
-//
-message CMsgSetVerticalScroll
-{
- optional uint32 browser_handle = 1;
- optional uint32 scroll = 2;
-}
-
-
-//
-// zoom the page this much, 0 to 100 - eHTMLCommands_SetZoomLevel
-//
-message CMsgSetZoomLevel
-{
- optional uint32 browser_handle = 1;
- optional uint32 zoom = 2;
-}
-
-
-//
-// look at the page source in notepad - eHTMLCommands_ViewSource
-//
-message CMsgViewSource
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// browser is setup and ready to load pages after a create - eHTMLCommands_BrowserReady
-//
-message CMsgBrowserReady
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// new url loaded - eHTMLCommands_URLChanged
-//
-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 [default = ""];
- optional string certName = 4 [default = "" ];
- optional int32 certExpiry = 5 [default = 0];
- optional int32 nCertBits = 6 [default = 0];
- optional bool bIsEVCert = 7 [default = false];
-
-}
-
-//
-// finished loading a page - eHTMLCommands_FinishedRequest
-//
-message CMsgFinishedRequest
-{
- optional uint32 browser_handle = 1;
- optional string url = 2;
- optional string pageTitle = 3;
- optional CHTMLPageSecurityInfo security_info = 4;
- repeated CHTMLHeader headers = 5;
-}
-
-
-//
-// starting a page load - eHTMLCommands_StartRequest
-//
-message CMsgStartRequest
-{
- optional uint32 browser_handle = 1;
- optional string url = 2;
- optional string target = 3;
- optional string postData = 4;
- optional bool bIsRedirect = 5;
-}
-
-
-//
-// do we want to allow this load - eHTMLCommands_StartRequestResponse
-//
-message CMsgStartRequestResponse
-{
- optional uint32 browser_handle = 1;
- optional bool bAllow = 2;
-}
-
-
-//
-// a html popup is showing - eHTMLCommands_ShowPopup
-//
-message CMsgShowPopup
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// done with the popup - eHTMLCommands_HidePopup
-//
-message CMsgHidePopup
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// a html popup is changing size - eHTMLCommands_SizePopup
-//
-message CMsgSizePopup
-{
- optional uint32 browser_handle = 1;
- optional uint32 x = 2;
- optional uint32 y = 3;
- optional uint32 wide = 4;
- optional uint32 tall = 5;
-}
-
-
-//
-// new tab plz - eHTMLCommands_OpenNewTab
-//
-message CMsgOpenNewTab
-{
- optional uint32 browser_handle = 1;
- optional string url = 2;
- optional bool bForeground = 3;
-}
-
-
-//
-// do we allow the tab - eHTMLCommands_OpenNewTabResponse
-//
-message CMsgOpenNewTabResponse
-{
- optional uint32 browser_handle = 1;
- optional bool bAllow = 2;
-}
-
-
-//
-// popup a new page here please - eHTMLCommands_PopupHTMLWindow
-//
-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;
-}
-
-
-//
-// do we allow the popup - eHTMLCommands_PopupHTMLWindowResponse
-//
-message CMsgPopupHTMLWindowResponse
-{
- optional uint32 browser_handle = 1;
- optional bool bAllow = 2;
-}
-
-
-//
-// title for the page - eHTMLCommands_SetHTMLTitle
-//
-message CMsgSetHTMLTitle
-{
- optional uint32 browser_handle = 1;
- optional string title = 2;
-}
-
-//
-// loading a url on a page - eHTMLCommands_LoadingResource
-//
-message CMsgLoadingResource
-{
- optional uint32 browser_handle = 1;
- optional string url = 2;
-}
-
-//
-// status to display - eHTMLCommands_StatusText
-//
-message CMsgStatusText
-{
- optional uint32 browser_handle = 1;
- optional string text = 2;
-}
-
-//
-// mouse cursor to this - eHTMLCommands_SetCursor
-//
-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;
-}
-
-//
-// let the user pick a file - eHTMLCommands_FileLoadDialog
-//
-message CMsgFileLoadDialog
-{
- optional uint32 browser_handle = 1;
- optional string title = 2;
- optional string initialFile = 3;
-}
-
-//
-// the user picked this - eHTMLCommands_FileLoadDialogResponse
-//
-message CMsgFileLoadDialogResponse
-{
- optional uint32 browser_handle = 1;
- repeated string files = 2;
-}
-
-
-//
-// show a tooltip - eHTMLCommands_ShowToolTip
-//
-message CMsgShowToolTip
-{
- optional uint32 browser_handle = 1;
- optional string text = 2;
-}
-
-
-//
-// update tooltip - eHTMLCommands_UpdateToolTip
-//
-message CMsgUpdateToolTip
-{
- optional uint32 browser_handle = 1;
- optional string text = 2;
-}
-
-
-//
-// done with tooltip - eHTMLCommands_HideToolTip
-//
-message CMsgHideToolTip
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// got search answers - eHTMLCommands_SearchResults
-//
-message CMsgSearchResults
-{
- optional uint32 browser_handle = 1;
- optional int32 activeMatch = 2;
- optional int32 results = 3;
-}
-
-
-//
-// close this window plz - eHTMLCommands_Close
-//
-message CMsgClose
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// need image for the page - eHTMLCommands_NeedsPaint
-//
-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;
-}
-
-
-//
-// all done with the paint pointer - eHTMLCommands_NeedsPaintResponse
-//
-message CMsgNeedsPaintResponse
-{
- optional uint32 browser_handle = 1;
- optional uint32 textureid = 2;
-}
-
-//
-// what zoom lvl we at? - eHTMLCommands_GetZoom
-//
-message CMsgGetZoom
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// this zoom level! - eHTMLCommands_GetZoomResponse
-//
-message CMsgGetZoomResponse
-{
- optional uint32 browser_handle = 1;
- optional float zoom = 2;
-}
-
-
-//
-// get the link at this x,y - eHTMLCommands_LinkAtPosition
-//
-message CMsgLinkAtPosition
-{
- optional uint32 browser_handle = 1;
- optional uint32 x = 2;
- optional uint32 y = 3;
-}
-
-
-//
-// link at this pos - eHTMLCommands_LinkAtPosition
-//
-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;
-}
-
-
-//
-// scale the page to the element at this position on the page, for at least this size
-//
-message CMsgZoomToElementAtPosition
-{
- optional uint32 browser_handle = 1;
- optional uint32 x = 2;
- optional uint32 y = 3;
-}
-
-//
-// response from the zoom, what rect did we pick and what zoom factor
-//
-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;
-}
-
-
-//
-// increase (or decrease if negative) the page scale factor used on this page
-//
-message CMsgScalePageToValue
-{
- optional uint32 browser_handle = 1;
- optional float scale = 2;
- optional float x = 3;
- optional float y = 4;
-}
-
-
-//
-// increase (or decrease if negative) the page scale factor used on this page
-//
-message CMsgScalePageToValueResponse
-{
- optional uint32 browser_handle = 1;
- optional float zoom = 2;
- optional int32 width_delta = 3;
- optional int32 height_delta = 4;
-}
-
-//
-// request a screenshot get written for this loaded url
-//
-message CMsgSavePageToJPEG
-{
- optional uint32 browser_handle = 1;
- optional string url = 2;
- optional string filename = 3;
- optional uint32 width = 4;
- optional uint32 height = 5;
-}
-
-
-//
-// screenshot taken, tell the main thread we did it
-//
-message CMsgSavePageToJPEGResponse
-{
- optional uint32 browser_handle = 1;
- optional string url = 2;
- optional string filename = 3;
-}
-
-
-//
-// web control wants to pop an alert dialog
-//
-message CMsgJSAlert
-{
- optional uint32 browser_handle = 1;
- optional string message = 2;
-}
-
-//
-// web control wants to pop an confirmation dialog
-//
-message CMsgJSConfirm
-{
- optional uint32 browser_handle = 1;
- optional string message = 2;
-}
-
-
-//
-// done showing the confirmation
-//
-message CMsgJSDialogResponse
-{
- optional uint32 browser_handle = 1;
- optional bool result = 2;
-}
-
-//
-// web control telling us the forward and back state
-//
-message CMsgCanGoBackAndForward
-{
- optional uint32 browser_handle = 1;
- optional bool bgoback = 2;
- optional bool bgoforward = 3;
-}
-
-//
-// web control telling us to open a steam dialog
-//
-message CMsgOpenSteamURL
-{
- optional uint32 browser_handle = 1;
- optional string url = 2;
-}
-
-
-//
-// set a cookie for the cef instance
-//
-message CMsgSetCookie
-{
- optional string key = 1;
- optional string value = 2;
- optional string path = 3;
- optional string host = 4;
- optional uint32 expires = 5;
-}
-
-
-//
-// tell cef that html isn't active so run slow
-//
-message CMsgSetTargetFrameRate
-{
- optional uint32 nTargetFrameRate = 1; // FPS to run the CEF think loop at
-}
-
-
-//
-// request a full repaint of the control
-//
-message CMsgFullRepaint
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// CEF wants to go fullscreen please
-//
-message CMsgRequestFullScreen
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// do we allow fullscreen
-//
-message CMsgRequestFullScreenResponse
-{
- optional uint32 browser_handle = 1;
- optional bool ballow = 2;
-}
-
-
-//
-// exit fullscreen if we are in it
-//
-message CMsgExitFullScreen
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// request all the cookies for this url
-//
-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;
-}
-
-
-//
-// return all the cookies for this url
-//
-message CMsgGetCookiesForURLResponse
-{
- optional uint32 browser_handle = 1;
- optional string url = 2;
- repeated CCookie cookies = 3;
-}
-
-
-//
-// sent when a html node gets key focus
-//
-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; // type of input, if node is input; otherwise unset
-}
-
-
-//
-// zoom the html control to the node with input focus
-//
-message CMsgZoomToFocusedElement
-{
- optional uint32 browser_handle = 1;
- optional uint32 leftoffset = 2 [default = 0];
- optional uint32 topoffset = 3 [default = 0];
-}
-
-
-//
-// ask a fullscreen flash control to close if open
-//
-message CMsgCloseFullScreenFlashIfOpen
-{
- optional uint32 browser_handle = 1;
-}
-
-//
-// ask a fullscreen flash control to pause itself if open
-//
-message CMsgPauseFullScreenFlashMovieIfOpen
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// get the string currently contained in the focused node
-//
-message CMsgFocusedNodeText
-{
- optional uint32 browser_handle = 1;
-}
-
-
-//
-// what text is in the focused node
-//
-message CMsgFocusedNodeTextResponse
-{
- optional uint32 browser_handle = 1;
- optional string value = 2;
-}
+//====== Copyright 1996-2010, Valve Corporation, All rights reserved. =======
+//
+// Purpose: The file defines our Google Protocol Buffers which are used in IPC
+// and inter-thread communcations in the tenfoot UI rendering system.
+//
+//=============================================================================
+
+// We care more about speed than code size
+option optimize_for = SPEED;
+
+// We don't use the service generation functionality
+option cc_generic_services = false;
+
+//
+// STYLE NOTES:
+//
+// Use CamelCase CMsgMyMessageName style names for messages.
+//
+// Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
+// but plays nice with the Google formatted code generation.
+//
+// Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
+// Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
+// your message and wants to remove or rename fields. This is especially important for messages sent from the server
+// to clients. We may be able to safely remove a field if it's optional even if an old client expects it, but if it
+// was required we can't remove it. Using required doesn't really offer any advantages at all as you'll just end up
+// with an empty message with all default values if you receive a message missing a required field, so there is no
+// real advantage to using it ever.
+//
+// Use fixed64 for JobId_t, GID_t, or SteamID or GameID. This is appropriate for any field that is normally
+// going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
+// than 2^56 as it will safe space on the wire in those cases.
+//
+// Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
+// 2^28. It will safe space in those cases, otherwise use int32 which will safe space for smaller values.
+// An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
+// time.
+//
+// Use uint32 with [default = 2] for EResult values in messages. The default is important since the normal int/uint
+// default of 0 is not a valid EResult value. 2 is k_EResultFail.
+//
+// See: http://code.google.com/apis/protocolbuffers/docs/proto.html for a complete language guide.
+//
+
+
+//
+// key up - eHTMLCommands_KeyUp
+//
+message CMsgKeyUp
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 keyCode = 2;
+ optional uint32 modifiers = 3;
+}
+
+
+//
+// key down - eHTMLCommands_KeyDown
+//
+message CMsgKeyDown
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 keyCode = 2;
+ optional uint32 modifiers = 3;
+}
+
+
+//
+// key unichar - eHTMLCommands_KeyChar
+//
+message CMsgKeyChar
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 unichar = 2;
+}
+
+
+//
+// mouse down - eHTMLCommands_MouseDown
+//
+message CMsgMouseDown
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 mouse_button = 2;
+}
+
+
+//
+// mouse up - eHTMLCommands_MouseUp
+//
+message CMsgMouseUp
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 mouse_button = 2;
+}
+
+
+//
+// mouse dbl click - eHTMLCommands_MouseDblClick
+//
+message CMsgMouseDblClick
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 mouse_button = 2;
+}
+
+
+//
+// mouse wheel - eHTMLCommands_MouseWheel
+//
+message CMsgMouseWheel
+{
+ optional uint32 browser_handle = 1;
+ optional int32 delta = 2;
+}
+
+
+//
+// mouse move - eHTMLCommands_MouseMove
+//
+message CMsgMouseMove
+{
+ optional uint32 browser_handle = 1;
+ optional int32 x = 2;
+ optional int32 y = 3;
+}
+
+
+//
+// mouse leave - eHTMLCommands_MouseLeave
+//
+message CMsgMouseLeave
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// make a cef control - eHTMLCommands_BrowserCreate
+//
+message CMsgBrowserCreate
+{
+ optional uint32 request_id = 1;
+ optional bool popup = 2 [default = false];
+ optional string useragent = 3;
+}
+
+
+//
+// ack to the main thread a control was made - eHTMLCommands_BrowserCreateResponse
+//
+message CMsgBrowserCreateResponse
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 request_id = 2;
+}
+
+
+//
+// delete a browser - eHTMLCommands_BrowserRemove
+//
+message CMsgBrowserRemove
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// send loc strings over to use for error page - eHTMLCommands_BrowserErrorStrings
+//
+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;
+}
+
+
+//
+// Set a browser to this size - eHTMLCommands_BrowserSize
+//
+message CMsgBrowserSize
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 width = 2;
+ optional uint32 height = 3;
+}
+
+
+//
+// Set position in the window - eHTMLCommands_BrowserPosition
+//
+message CMsgBrowserPosition
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 x = 2;
+ optional uint32 y = 3;
+}
+
+
+//
+// load this url - eHTMLCommands_PostURL
+//
+message CMsgPostURL
+{
+ optional uint32 browser_handle = 1;
+ optional string url = 2;
+ optional string post = 3;
+ optional uint32 pageserial = 4;
+}
+
+
+//
+// have cef send this html header for all page loads -eHTMLCommands_AddHeader
+//
+message CMsgAddHeader
+{
+ optional uint32 browser_handle = 1;
+ optional string key = 2;
+ optional string value = 3;
+}
+
+
+//
+// stop loading a page - eHTMLCommands_StopLoad
+//
+message CMsgStopLoad
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// reload a page - eHTMLCommands_Reload
+//
+message CMsgReload
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// next page - eHTMLCommands_GoForward
+//
+message CMsgGoForward
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// back a page in the stack - eHTMLCommands_GoBack
+//
+message CMsgGoBack
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// copy the currently selected text - eHTMLCommands_Copy
+//
+message CMsgCopy
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// paste text here from the clipboard - eHTMLCommands_Paste
+//
+message CMsgPaste
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// run this javascript on the current page - eHTMLCommands_ExecuteJavaScript
+//
+message CMsgExecuteJavaScript
+{
+ optional uint32 browser_handle = 1;
+ optional string script = 2;
+}
+
+
+//
+// tell it that it has key focus - eHTMLCommands_SetFocus
+//
+message CMsgSetFocus
+{
+ optional uint32 browser_handle = 1;
+ optional bool focus = 2;
+}
+
+
+//
+// how big is the scroll bar plz - eHTMLCommands_HorizontalScrollBarSize
+//
+message CMsgHorizontalScrollBarSize
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// its this big! - eHTMLCommands_HorizontalScrollBarSizeResponse
+//
+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;
+}
+
+
+//
+// eHTMLCommands_VerticalScrollBarSize
+//
+message CMsgVerticalScrollBarSize
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// eHTMLCommands_VerticalScrollBarSizeResponse
+//
+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;
+}
+
+
+//
+// find this string in the page - eHTMLCommands_Find
+//
+message CMsgFind
+{
+ optional uint32 browser_handle = 1;
+ optional string find = 2;
+ optional bool infind = 3;
+ optional bool reverse = 4 [ default = false ];
+}
+
+//
+// done finding - eHTMLCommands_StopFind
+//
+message CMsgStopFind
+{
+ optional uint32 browser_handle = 1;
+}
+
+//
+// scroll here - eHTMLCommands_SetHorizontalScroll
+//
+message CMsgSetHorizontalScroll
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 scroll = 2;
+}
+
+
+//
+// scroll here - eHTMLCommands_SetHorizontalScroll
+//
+message CMsgSetVerticalScroll
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 scroll = 2;
+}
+
+
+//
+// zoom the page this much, 0 to 100 - eHTMLCommands_SetZoomLevel
+//
+message CMsgSetZoomLevel
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 zoom = 2;
+}
+
+
+//
+// look at the page source in notepad - eHTMLCommands_ViewSource
+//
+message CMsgViewSource
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// browser is setup and ready to load pages after a create - eHTMLCommands_BrowserReady
+//
+message CMsgBrowserReady
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// new url loaded - eHTMLCommands_URLChanged
+//
+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 [default = ""];
+ optional string certName = 4 [default = "" ];
+ optional int32 certExpiry = 5 [default = 0];
+ optional int32 nCertBits = 6 [default = 0];
+ optional bool bIsEVCert = 7 [default = false];
+
+}
+
+//
+// finished loading a page - eHTMLCommands_FinishedRequest
+//
+message CMsgFinishedRequest
+{
+ optional uint32 browser_handle = 1;
+ optional string url = 2;
+ optional string pageTitle = 3;
+ optional CHTMLPageSecurityInfo security_info = 4;
+ repeated CHTMLHeader headers = 5;
+}
+
+
+//
+// starting a page load - eHTMLCommands_StartRequest
+//
+message CMsgStartRequest
+{
+ optional uint32 browser_handle = 1;
+ optional string url = 2;
+ optional string target = 3;
+ optional string postData = 4;
+ optional bool bIsRedirect = 5;
+}
+
+
+//
+// do we want to allow this load - eHTMLCommands_StartRequestResponse
+//
+message CMsgStartRequestResponse
+{
+ optional uint32 browser_handle = 1;
+ optional bool bAllow = 2;
+}
+
+
+//
+// a html popup is showing - eHTMLCommands_ShowPopup
+//
+message CMsgShowPopup
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// done with the popup - eHTMLCommands_HidePopup
+//
+message CMsgHidePopup
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// a html popup is changing size - eHTMLCommands_SizePopup
+//
+message CMsgSizePopup
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 x = 2;
+ optional uint32 y = 3;
+ optional uint32 wide = 4;
+ optional uint32 tall = 5;
+}
+
+
+//
+// new tab plz - eHTMLCommands_OpenNewTab
+//
+message CMsgOpenNewTab
+{
+ optional uint32 browser_handle = 1;
+ optional string url = 2;
+ optional bool bForeground = 3;
+}
+
+
+//
+// do we allow the tab - eHTMLCommands_OpenNewTabResponse
+//
+message CMsgOpenNewTabResponse
+{
+ optional uint32 browser_handle = 1;
+ optional bool bAllow = 2;
+}
+
+
+//
+// popup a new page here please - eHTMLCommands_PopupHTMLWindow
+//
+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;
+}
+
+
+//
+// do we allow the popup - eHTMLCommands_PopupHTMLWindowResponse
+//
+message CMsgPopupHTMLWindowResponse
+{
+ optional uint32 browser_handle = 1;
+ optional bool bAllow = 2;
+}
+
+
+//
+// title for the page - eHTMLCommands_SetHTMLTitle
+//
+message CMsgSetHTMLTitle
+{
+ optional uint32 browser_handle = 1;
+ optional string title = 2;
+}
+
+//
+// loading a url on a page - eHTMLCommands_LoadingResource
+//
+message CMsgLoadingResource
+{
+ optional uint32 browser_handle = 1;
+ optional string url = 2;
+}
+
+//
+// status to display - eHTMLCommands_StatusText
+//
+message CMsgStatusText
+{
+ optional uint32 browser_handle = 1;
+ optional string text = 2;
+}
+
+//
+// mouse cursor to this - eHTMLCommands_SetCursor
+//
+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;
+}
+
+//
+// let the user pick a file - eHTMLCommands_FileLoadDialog
+//
+message CMsgFileLoadDialog
+{
+ optional uint32 browser_handle = 1;
+ optional string title = 2;
+ optional string initialFile = 3;
+}
+
+//
+// the user picked this - eHTMLCommands_FileLoadDialogResponse
+//
+message CMsgFileLoadDialogResponse
+{
+ optional uint32 browser_handle = 1;
+ repeated string files = 2;
+}
+
+
+//
+// show a tooltip - eHTMLCommands_ShowToolTip
+//
+message CMsgShowToolTip
+{
+ optional uint32 browser_handle = 1;
+ optional string text = 2;
+}
+
+
+//
+// update tooltip - eHTMLCommands_UpdateToolTip
+//
+message CMsgUpdateToolTip
+{
+ optional uint32 browser_handle = 1;
+ optional string text = 2;
+}
+
+
+//
+// done with tooltip - eHTMLCommands_HideToolTip
+//
+message CMsgHideToolTip
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// got search answers - eHTMLCommands_SearchResults
+//
+message CMsgSearchResults
+{
+ optional uint32 browser_handle = 1;
+ optional int32 activeMatch = 2;
+ optional int32 results = 3;
+}
+
+
+//
+// close this window plz - eHTMLCommands_Close
+//
+message CMsgClose
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// need image for the page - eHTMLCommands_NeedsPaint
+//
+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;
+}
+
+
+//
+// all done with the paint pointer - eHTMLCommands_NeedsPaintResponse
+//
+message CMsgNeedsPaintResponse
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 textureid = 2;
+}
+
+//
+// what zoom lvl we at? - eHTMLCommands_GetZoom
+//
+message CMsgGetZoom
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// this zoom level! - eHTMLCommands_GetZoomResponse
+//
+message CMsgGetZoomResponse
+{
+ optional uint32 browser_handle = 1;
+ optional float zoom = 2;
+}
+
+
+//
+// get the link at this x,y - eHTMLCommands_LinkAtPosition
+//
+message CMsgLinkAtPosition
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 x = 2;
+ optional uint32 y = 3;
+}
+
+
+//
+// link at this pos - eHTMLCommands_LinkAtPosition
+//
+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;
+}
+
+
+//
+// scale the page to the element at this position on the page, for at least this size
+//
+message CMsgZoomToElementAtPosition
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 x = 2;
+ optional uint32 y = 3;
+}
+
+//
+// response from the zoom, what rect did we pick and what zoom factor
+//
+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;
+}
+
+
+//
+// increase (or decrease if negative) the page scale factor used on this page
+//
+message CMsgScalePageToValue
+{
+ optional uint32 browser_handle = 1;
+ optional float scale = 2;
+ optional float x = 3;
+ optional float y = 4;
+}
+
+
+//
+// increase (or decrease if negative) the page scale factor used on this page
+//
+message CMsgScalePageToValueResponse
+{
+ optional uint32 browser_handle = 1;
+ optional float zoom = 2;
+ optional int32 width_delta = 3;
+ optional int32 height_delta = 4;
+}
+
+//
+// request a screenshot get written for this loaded url
+//
+message CMsgSavePageToJPEG
+{
+ optional uint32 browser_handle = 1;
+ optional string url = 2;
+ optional string filename = 3;
+ optional uint32 width = 4;
+ optional uint32 height = 5;
+}
+
+
+//
+// screenshot taken, tell the main thread we did it
+//
+message CMsgSavePageToJPEGResponse
+{
+ optional uint32 browser_handle = 1;
+ optional string url = 2;
+ optional string filename = 3;
+}
+
+
+//
+// web control wants to pop an alert dialog
+//
+message CMsgJSAlert
+{
+ optional uint32 browser_handle = 1;
+ optional string message = 2;
+}
+
+//
+// web control wants to pop an confirmation dialog
+//
+message CMsgJSConfirm
+{
+ optional uint32 browser_handle = 1;
+ optional string message = 2;
+}
+
+
+//
+// done showing the confirmation
+//
+message CMsgJSDialogResponse
+{
+ optional uint32 browser_handle = 1;
+ optional bool result = 2;
+}
+
+//
+// web control telling us the forward and back state
+//
+message CMsgCanGoBackAndForward
+{
+ optional uint32 browser_handle = 1;
+ optional bool bgoback = 2;
+ optional bool bgoforward = 3;
+}
+
+//
+// web control telling us to open a steam dialog
+//
+message CMsgOpenSteamURL
+{
+ optional uint32 browser_handle = 1;
+ optional string url = 2;
+}
+
+
+//
+// set a cookie for the cef instance
+//
+message CMsgSetCookie
+{
+ optional string key = 1;
+ optional string value = 2;
+ optional string path = 3;
+ optional string host = 4;
+ optional uint32 expires = 5;
+}
+
+
+//
+// tell cef that html isn't active so run slow
+//
+message CMsgSetTargetFrameRate
+{
+ optional uint32 nTargetFrameRate = 1; // FPS to run the CEF think loop at
+}
+
+
+//
+// request a full repaint of the control
+//
+message CMsgFullRepaint
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// CEF wants to go fullscreen please
+//
+message CMsgRequestFullScreen
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// do we allow fullscreen
+//
+message CMsgRequestFullScreenResponse
+{
+ optional uint32 browser_handle = 1;
+ optional bool ballow = 2;
+}
+
+
+//
+// exit fullscreen if we are in it
+//
+message CMsgExitFullScreen
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// request all the cookies for this url
+//
+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;
+}
+
+
+//
+// return all the cookies for this url
+//
+message CMsgGetCookiesForURLResponse
+{
+ optional uint32 browser_handle = 1;
+ optional string url = 2;
+ repeated CCookie cookies = 3;
+}
+
+
+//
+// sent when a html node gets key focus
+//
+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; // type of input, if node is input; otherwise unset
+}
+
+
+//
+// zoom the html control to the node with input focus
+//
+message CMsgZoomToFocusedElement
+{
+ optional uint32 browser_handle = 1;
+ optional uint32 leftoffset = 2 [default = 0];
+ optional uint32 topoffset = 3 [default = 0];
+}
+
+
+//
+// ask a fullscreen flash control to close if open
+//
+message CMsgCloseFullScreenFlashIfOpen
+{
+ optional uint32 browser_handle = 1;
+}
+
+//
+// ask a fullscreen flash control to pause itself if open
+//
+message CMsgPauseFullScreenFlashMovieIfOpen
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// get the string currently contained in the focused node
+//
+message CMsgFocusedNodeText
+{
+ optional uint32 browser_handle = 1;
+}
+
+
+//
+// what text is in the focused node
+//
+message CMsgFocusedNodeTextResponse
+{
+ optional uint32 browser_handle = 1;
+ optional string value = 2;
+}