Project

General

Profile

SO3Engine
SO3::EmbeddedWebNavigator::WebNavigatorManager Class Reference

#include <SO3EmbeddedWebNavigatorManager.h>

Inheritance diagram for SO3::EmbeddedWebNavigator::WebNavigatorManager:

Public Types

typedef std::map< unsigned long, WebNavigator * > WebNavigatorList
 

Public Member Functions

 WebNavigatorManager (const ScolWindowHandle &scolMainWindow, std::string cacheDirectory)
 
 ~WebNavigatorManager ()
 
bool IsInitialized ()
 
virtual CefRefPtr< CefBrowserProcessHandler > GetBrowserProcessHandler () OVERRIDE
 
virtual void OnContextInitialized () OVERRIDE
 
WebNavigatorCreateNavigator (const ScolWindowHandle &parentWindowHandle, int xPosition, int yPosition, int width, int height, std::string url)
 
WebNavigatorCreateNavigator (const ScolWindowHandle &parentWindowHandle, int width, int height, std::string url, bool transparency=false)
 
void DestroyNavigator (WebNavigator *webNavigator)
 
WebNavigatorGetNavigator (unsigned long uniqueId)
 
bool SetCookie (const std::string &url, const std::string &name, const std::string &value, const std::string &domain, const std::string &path, const bool &secure, const bool &httponly)
 
bool DeleteCookies (const std::string &url, const std::string &cookie_name)
 
void Update ()
 
void InvokeExternalCall (unsigned long uniqueId, SScriptFunction functionCalled)
 
void InvokeExternalCallStr (unsigned long uniqueId, SScriptFunction functionCalled)
 
void InvokeNavStateChange (unsigned long uniqueId, bool canGoBack, bool canGoForward)
 
void InvokeAddressChange (unsigned long uniqueId, const std::string &frameName, const std::string &url)
 
void InvokeTitleChange (unsigned long uniqueId, const std::string &title)
 
void InvokeTooltip (unsigned long uniqueId, std::string &text)
 
void InvokeCursorChange (unsigned long uniqueId, HCURSOR newCursor)
 
void InvokeStatusMessage (unsigned long uniqueId, const std::string &value)
 
void InvokeConsoleMessage (unsigned long uniqueId, const std::string &message, const std::string &source, int line)
 
void InvokeBeforePopup (unsigned long uniqueId, int popupX, int popupY, int popupWidth, int popupHeight, std::string popupUrl)
 
void InvokeRunModal (unsigned long uniqueId)
 
void InvokeLoadStart (unsigned long uniqueId, const std::string &frameName)
 
void InvokeLoadEnd (unsigned long uniqueId, const std::string &frameName, int httpStatusCode)
 
void InvokeLoadError (unsigned long uniqueId, const std::string &frameName, int errorCode, const std::string &failedUrl, std::string &errorText)
 
void InvokeFindResult (unsigned long uniqueId, int identifier, int count, const CefRect &selectionRect, int activeMatchOrdinal, bool finalUpdate)
 

Static Public Member Functions

static WebNavigatorManagerGetSingleton ()
 
static WebNavigatorManagerGetSingletonPtr ()
 
static void DestroyManager ()
 

Public Attributes

std::shared_mutex webMessageQueueCriticalSection
 
boost::asio::io_service mainThreadWebMessageQueue
 

Detailed Description

Definition at line 42 of file SO3EmbeddedWebNavigatorManager.h.

Member Typedef Documentation

◆ WebNavigatorList

Constructor & Destructor Documentation

◆ WebNavigatorManager()

SO3::EmbeddedWebNavigator::WebNavigatorManager::WebNavigatorManager ( const ScolWindowHandle &  scolMainWindow,
std::string  cacheDirectory 
)

Constructor.

Definition at line 39 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ ~WebNavigatorManager()

SO3::EmbeddedWebNavigator::WebNavigatorManager::~WebNavigatorManager ( )

Destructor.

Definition at line 62 of file SO3EmbeddedWebNavigatorManager.cpp.

Member Function Documentation

◆ CreateNavigator() [1/2]

WebNavigator * SO3::EmbeddedWebNavigator::WebNavigatorManager::CreateNavigator ( const ScolWindowHandle &  parentWindowHandle,
int  width,
int  height,
std::string  url,
bool  transparency = false 
)

Create a new web navigator control that will render it's content "offscreen"

Definition at line 170 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ CreateNavigator() [2/2]

WebNavigator * SO3::EmbeddedWebNavigator::WebNavigatorManager::CreateNavigator ( const ScolWindowHandle &  parentWindowHandle,
int  xPosition,
int  yPosition,
int  width,
int  height,
std::string  url 
)

Create a new web navigator control

Definition at line 153 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ DeleteCookies()

bool SO3::EmbeddedWebNavigator::WebNavigatorManager::DeleteCookies ( const std::string &  url,
const std::string &  cookie_name 
)

Delete all cookies that match the specified parameters. If both |url| and values |cookie_name| are specified all host and domain cookies matching both will be deleted. If only |url| is specified all host cookies (but not domain cookies) irrespective of path will be deleted. If |url| is empty all cookies for all hosts and domains will be deleted. Returns false if a non-empty invalid URL is specified or if cookies cannot be accessed.

Definition at line 235 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ DestroyManager()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::DestroyManager ( )
static

Destroy the manager

Definition at line 139 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ DestroyNavigator()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::DestroyNavigator ( WebNavigator webNavigator)

Destroy a defined existing web navigator

Definition at line 187 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ GetBrowserProcessHandler()

virtual CefRefPtr< CefBrowserProcessHandler > SO3::EmbeddedWebNavigator::WebNavigatorManager::GetBrowserProcessHandler ( )
inlinevirtual

CefBrowserProcessHandler

Definition at line 95 of file SO3EmbeddedWebNavigatorManager.h.

◆ GetNavigator()

WebNavigator * SO3::EmbeddedWebNavigator::WebNavigatorManager::GetNavigator ( unsigned long  uniqueId)

Definition at line 208 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ GetSingleton()

WebNavigatorManager & SO3::EmbeddedWebNavigator::WebNavigatorManager::GetSingleton ( )
static

Get the singleton instance.

Definition at line 128 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ GetSingletonPtr()

WebNavigatorManager * SO3::EmbeddedWebNavigator::WebNavigatorManager::GetSingletonPtr ( )
static

Get the pointer of the singleton instance.

Definition at line 134 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeAddressChange()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeAddressChange ( unsigned long  uniqueId,
const std::string &  frameName,
const std::string &  url 
)
Remarks
Internal use only

Definition at line 279 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeBeforePopup()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeBeforePopup ( unsigned long  uniqueId,
int  popupX,
int  popupY,
int  popupWidth,
int  popupHeight,
std::string  popupUrl 
)
Remarks
Internal use only

Definition at line 339 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeConsoleMessage()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeConsoleMessage ( unsigned long  uniqueId,
const std::string &  message,
const std::string &  source,
int  line 
)
Remarks
Internal use only

Definition at line 329 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeCursorChange()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeCursorChange ( unsigned long  uniqueId,
HCURSOR  newCursor 
)
Remarks
Internal use only

Definition at line 309 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeExternalCall()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeExternalCall ( unsigned long  uniqueId,
SScriptFunction  functionCalled 
)
Remarks
Internal use only

Definition at line 253 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeExternalCallStr()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeExternalCallStr ( unsigned long  uniqueId,
SScriptFunction  functionCalled 
)
Remarks
Internal use only

Definition at line 261 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeFindResult()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeFindResult ( unsigned long  uniqueId,
int  identifier,
int  count,
const CefRect &  selectionRect,
int  activeMatchOrdinal,
bool  finalUpdate 
)
Remarks
Internal use only

Definition at line 389 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeLoadEnd()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeLoadEnd ( unsigned long  uniqueId,
const std::string &  frameName,
int  httpStatusCode 
)
Remarks
Internal use only

Definition at line 369 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeLoadError()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeLoadError ( unsigned long  uniqueId,
const std::string &  frameName,
int  errorCode,
const std::string &  failedUrl,
std::string &  errorText 
)
Remarks
Internal use only

Definition at line 379 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeLoadStart()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeLoadStart ( unsigned long  uniqueId,
const std::string &  frameName 
)
Remarks
Internal use only

Definition at line 359 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeNavStateChange()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeNavStateChange ( unsigned long  uniqueId,
bool  canGoBack,
bool  canGoForward 
)
Remarks
Internal use only

Definition at line 269 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeRunModal()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeRunModal ( unsigned long  uniqueId)
Remarks
Internal use only

Definition at line 349 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeStatusMessage()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeStatusMessage ( unsigned long  uniqueId,
const std::string &  value 
)
Remarks
Internal use only

Definition at line 319 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeTitleChange()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeTitleChange ( unsigned long  uniqueId,
const std::string &  title 
)
Remarks
Internal use only

Definition at line 289 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ InvokeTooltip()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::InvokeTooltip ( unsigned long  uniqueId,
std::string &  text 
)
Remarks
Internal use only

Definition at line 299 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ IsInitialized()

bool SO3::EmbeddedWebNavigator::WebNavigatorManager::IsInitialized ( )

Get the initialized state

Definition at line 148 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ OnContextInitialized()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::OnContextInitialized ( )
virtual

CefBrowserProcessHandler handler

Definition at line 84 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ SetCookie()

bool SO3::EmbeddedWebNavigator::WebNavigatorManager::SetCookie ( const std::string &  url,
const std::string &  name,
const std::string &  value,
const std::string &  domain,
const std::string &  path,
const bool &  secure,
const bool &  httponly 
)

Sets a cookie given a valid URL and explicit user-provided cookie attributes. This function expects each attribute to be well-formed. It will check for disallowed characters (e.g. the ';' character is disallowed within the cookie value attribute) and will return false without setting the cookie if such characters are found.

Parameters
nameThe cookie name.
valueThe cookie value.
domainDomain cookies are stored with a leading "." and are visible to sub-domains whereas host cookies are not.
pathIf is non-empty only URLs at or below the path will get the cookie value.
secureIf is true the cookie will only be sent for HTTPS requests.
httponlyIf is true the cookie will only be sent for HTTP requests.

Definition at line 217 of file SO3EmbeddedWebNavigatorManager.cpp.

◆ Update()

void SO3::EmbeddedWebNavigator::WebNavigatorManager::Update ( )
Remarks
Internal use only

Definition at line 244 of file SO3EmbeddedWebNavigatorManager.cpp.

Member Data Documentation

◆ mainThreadWebMessageQueue

boost::asio::io_service SO3::EmbeddedWebNavigator::WebNavigatorManager::mainThreadWebMessageQueue

Definition at line 49 of file SO3EmbeddedWebNavigatorManager.h.

◆ webMessageQueueCriticalSection

std::shared_mutex SO3::EmbeddedWebNavigator::WebNavigatorManager::webMessageQueueCriticalSection

Definition at line 48 of file SO3EmbeddedWebNavigatorManager.h.


The documentation for this class was generated from the following files: