summaryrefslogtreecommitdiffstats
path: root/lib/web_engine_context.h
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2013-07-09 11:18:30 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-07-09 13:54:31 +0200
commitdccb12ef0d2746a3112e04848ee831aaeda0a0da (patch)
treec638d6bbf7955eff17e85647180cb20124765452 /lib/web_engine_context.h
parent895ddf680e1f9fc8a01f40fb569a6f58bc99196a (diff)
Do not leak singletons in WebEngineContext
Prevent leaking ContentMainDelegateQt, ContentMainRunner and BrowserMainRunner in WebEngineContext so that resources are cleaned up and corresponding notifications are executed. Change-Id: Ib4a13b5e739ed0e60c90bf721a943a3ad19c206c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'lib/web_engine_context.h')
-rw-r--r--lib/web_engine_context.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/web_engine_context.h b/lib/web_engine_context.h
index 2bf20ac4b..2b349b29b 100644
--- a/lib/web_engine_context.h
+++ b/lib/web_engine_context.h
@@ -49,6 +49,13 @@ namespace base {
class RunLoop;
}
+namespace content {
+class BrowserMainRunner;
+class ContentMainRunner;
+}
+
+class ContentMainDelegateQt;
+
class WebEngineContext : public base::RefCounted<WebEngineContext> {
public:
static scoped_refptr<WebEngineContext> current();
@@ -59,6 +66,9 @@ private:
~WebEngineContext();
scoped_ptr<base::RunLoop> m_runLoop;
+ scoped_ptr<ContentMainDelegateQt> m_mainDelegate;
+ scoped_ptr<content::ContentMainRunner> m_contentRunner;
+ scoped_ptr<content::BrowserMainRunner> m_browserRunner;
};
#endif