ClientHandler::ClientHandler()
  : m_MainHwnd(NULL),
    m_BrowserId(0),
    m_bIsClosing(false),
    m_EditHwnd(NULL),
    m_BackHwnd(NULL),
    m_ForwardHwnd(NULL),
    m_StopHwnd(NULL),
    m_ReloadHwnd(NULL),
    m_bFocusOnEditableField(false) {
  CreateProcessMessageDelegates(process_message_delegates_);

  // Read command line settings.
  CefRefPtr<CefCommandLine> command_line =
      CefCommandLine::GetGlobalCommandLine();

  if (command_line->HasSwitch(cefclient::kUrl))
    m_StartupURL = command_line->GetSwitchValue(cefclient::kUrl);
  if (m_StartupURL.empty())
    m_StartupURL = "http://www.google.com/";

  // Also use external dev tools if off-screen rendering is enabled since we
  // disallow popup windows.
  m_bExternalDevTools =
      command_line->HasSwitch(cefclient::kExternalDevTools) ||
      AppIsOffScreenRenderingEnabled();

  m_bMouseCursorChangeDisabled =
      command_line->HasSwitch(cefclient::kMouseCursorChangeDisabled);
}
Example #2
0
ClientHandler::ClientHandler()
  : m_MainHwnd(NULL),
    m_BrowserId(0),
    m_EditHwnd(NULL),
    m_BackHwnd(NULL),
    m_ForwardHwnd(NULL),
    m_StopHwnd(NULL),
    m_ReloadHwnd(NULL),
    m_bFocusOnEditableField(false) {
  CreateProcessMessageDelegates(process_message_delegates_);
  CreateRequestDelegates(request_delegates_);

  // Read command line settings.
  CefRefPtr<CefCommandLine> command_line =
      CefCommandLine::GetGlobalCommandLine();

  DRCConfiguration config;
  config.Init();
  m_StartupURL = StartupURL;

  /* original code (Henry)
  if (command_line->HasSwitch(cefclient::kUrl))
    m_StartupURL = command_line->GetSwitchValue(cefclient::kUrl);
  if (m_StartupURL.empty())
    m_StartupURL = "http://www.google.com/";
  */

  const char *ss = {cefclient::URLStartUp};
  m_bExternalDevTools = command_line->HasSwitch(cefclient::kExternalDevTools);
}
Example #3
0
ClientHandler::ClientHandler()
	: 
	  m_bFocusOnEditableField(false)
{
	sClientApp->addClientHandler(CefRefPtr<ClientHandler>(this));

	//ofLogNotice() << (__FUNCTION__) << std::endl;

	CreateProcessMessageDelegates(process_message_delegates_);

	// Read command line settings.
	CefRefPtr<CefCommandLine> command_line =
	    CefCommandLine::GetGlobalCommandLine();

	if (command_line->HasSwitch(cefclient::kUrl))
		m_StartupURL = command_line->GetSwitchValue(cefclient::kUrl);
	if (m_StartupURL.empty())
		m_StartupURL = "http://www.google.com/";

	// Also use external dev tools if off-screen rendering is enabled since we
	// disallow popup windows.
	m_bExternalDevTools = true;

	m_bMouseCursorChangeDisabled =
	    command_line->HasSwitch(cefclient::kMouseCursorChangeDisabled);

	//  Grab the openframeworks Window Handle
	ofxWindowHandle = WindowFromDC(wglGetCurrentDC());

}
Example #4
0
ClientHandler::ClientHandler()
  : m_BrowserId(0),
    m_bIsClosing(false),
    m_bFocusOnEditableField(false) {
  CreateProcessMessageDelegates(process_message_delegates_);

  if (m_StartupURL.empty())
    m_StartupURL = "about:blank";
}
ClientHandler::ClientHandler()
  : m_MainHwnd(NULL),
    m_BrowserId(0),
    m_EditHwnd(NULL),
    m_BackHwnd(NULL),
    m_ForwardHwnd(NULL),
    m_StopHwnd(NULL),
    m_ReloadHwnd(NULL),
    m_bFormElementHasFocus(false),
    m_quitting(false) {
  callbackId = 0;
  CreateProcessMessageDelegates(process_message_delegates_);
  CreateRequestDelegates(request_delegates_);
}