summaryrefslogtreecommitdiffstats
path: root/src/core/dev_tools_http_handler_delegate_qt.h
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-11-17 16:52:33 +0100
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2015-01-22 16:22:12 +0100
commit35630628d927d95bd5b7a8720e982294e7281b15 (patch)
treedd39f51154b5448140da3a455731a13779f9d7d6 /src/core/dev_tools_http_handler_delegate_qt.h
parent9d9268ae1ce34a853b48d3b7189dba6448c38033 (diff)
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 <pierre.rossi@theqtcompany.com>
Diffstat (limited to 'src/core/dev_tools_http_handler_delegate_qt.h')
-rw-r--r--src/core/dev_tools_http_handler_delegate_qt.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/dev_tools_http_handler_delegate_qt.h b/src/core/dev_tools_http_handler_delegate_qt.h
index bbee613a2..8a8a658a6 100644
--- a/src/core/dev_tools_http_handler_delegate_qt.h
+++ b/src/core/dev_tools_http_handler_delegate_qt.h
@@ -40,6 +40,7 @@
#include "content/public/browser/devtools_http_handler_delegate.h"
#include "content/public/browser/devtools_manager_delegate.h"
+#include <QString>
#include <QtCore/qcompilerdetection.h> // needed for Q_DECL_OVERRIDE
namespace net {
@@ -55,10 +56,11 @@ class RenderViewHost;
class DevToolsHttpHandlerDelegateQt : public content::DevToolsHttpHandlerDelegate {
public:
- explicit DevToolsHttpHandlerDelegateQt(content::BrowserContext* browser_context);
+ DevToolsHttpHandlerDelegateQt();
virtual ~DevToolsHttpHandlerDelegateQt();
// content::DevToolsHttpHandlerDelegate Overrides
+ virtual void Initialized(const net::IPEndPoint &ip_address) Q_DECL_OVERRIDE;
virtual std::string GetDiscoveryPageHTML() Q_DECL_OVERRIDE;
virtual bool BundlesFrontendResources() Q_DECL_OVERRIDE;
virtual base::FilePath GetDebugFrontendDir() Q_DECL_OVERRIDE;
@@ -67,8 +69,9 @@ public:
virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(net::StreamListenSocket::Delegate *delegate, std::string *name) Q_DECL_OVERRIDE;
private:
- content::BrowserContext* m_browserContext;
content::DevToolsHttpHandler *m_devtoolsHttpHandler;
+ QString m_bindAddress;
+ int m_port;
};
class DevToolsManagerDelegateQt : public content::DevToolsManagerDelegate {