From 35630628d927d95bd5b7a8720e982294e7281b15 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Mon, 17 Nov 2014 16:52:33 +0100 Subject: Replace the inspectable property with an environment variable The current implementation would enable or disable the inspector globally when the inspectable property was set on a WebEngineView, overwriting the value previously set by other pages. Instead of havind default port for the debugging server and having to enable debugging on individual pages, use an environment variable, QTWEBENGINE_REMOTE_DEBUGGING, to enable the debugging server for the whole application at the same time as specifying the port. The format is the same as for QTWEBKIT_INSPECTOR_SERVER in QtWebKit. QTWEBENGINE_REMOTE_DEBUGGING is set by default in quicktestbrowser to ease development. This also keeps the input reading from the --remote-debugging-port command line switch for convenience, but its usage should be considered internal. This patch also take the opportunity to remove the unused DevToolsHttpHandlerDelegateQt::m_browserContext and to move the ownership from ContentBrowserClientQt to WebEngineContext since the list of inspectable pages isn't bound to the BrowserContext anyway. Change-Id: I772687f88f4feee0cc14dd182b0129cc0ea384dd Reviewed-by: Pierre Rossi --- src/core/web_engine_context.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/web_engine_context.cpp') diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 73ca9c603..d0a8bb84f 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -70,6 +70,7 @@ #include "content_browser_client_qt.h" #include "content_client_qt.h" #include "content_main_delegate_qt.h" +#include "dev_tools_http_handler_delegate_qt.h" #include "gl_context_qt.h" #include "media_capture_devices_dispatcher.h" #include "type_conversion.h" @@ -262,6 +263,7 @@ WebEngineContext::WebEngineContext() m_runLoop.reset(new base::RunLoop); m_runLoop->BeforeRun(); + m_devtools.reset(new DevToolsHttpHandlerDelegateQt); // Force the initialization of MediaCaptureDevicesDispatcher on the UI // thread to avoid a thread check assertion in its constructor when it // first gets referenced on the IO thread. -- cgit v1.2.3