diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-06-15 18:51:21 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2018-07-02 10:31:10 +0000 |
commit | ec127d7e4898940116be9fbbc8dc94b4cfa9b18c (patch) | |
tree | af9dc33792e1948bdc7362925ab68f74ee9085a8 /src/core/web_engine_context.cpp | |
parent | 59b8f28d029e45ac3b3e95edda82e6607a880979 (diff) |
Migrate from BUILDFLAG to QT_CONFIG
During configuration we mapped qt webengine fetures
to chromium ones and passed them to gn. We used BUILDFLAG to
optionally compile code in core. Use QT_CONFIG directly
for qt files and add config sanity checks to make
sure requested features are present.
Change-Id: I930df114ac9aec8e73139ea9135925fc3ad8e39c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r-- | src/core/web_engine_context.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 8a76bb683..fce5e9859 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -48,9 +48,9 @@ #include "base/run_loop.h" #include "base/threading/thread_restrictions.h" #include "cc/base/switches.h" -#if BUILDFLAG(ENABLE_BASIC_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) #include "chrome/browser/printing/print_job_manager.h" -#endif // defined(ENABLE_BASIC_PRINTING) +#endif #include "components/viz/common/features.h" #include "components/web_cache/browser/web_cache_manager.h" #include "content/browser/devtools/devtools_http_handler.h" @@ -155,7 +155,7 @@ bool usingQtQuick2DRenderer() return device != QLatin1String("default"); } #endif //QT_NO_OPENGL -#if BUILDFLAG(ENABLE_PLUGINS) +#if QT_CONFIG(webengine_pepper_plugins) void dummyGetPluginCallback(const std::vector<content::WebPluginInfo>&) { } @@ -562,7 +562,7 @@ WebEngineContext::WebEngineContext() media::AudioManager::SetGlobalAppName(QCoreApplication::applicationName().toStdString()); #endif -#if BUILDFLAG(ENABLE_PLUGINS) +#if QT_CONFIG(webengine_pepper_plugins) // Creating pepper plugins from the page (which calls PluginService::GetPluginInfoArray) // might fail unless the page queried the list of available plugins at least once // (which ends up calling PluginService::GetPlugins). Since the plugins list can only @@ -572,17 +572,17 @@ WebEngineContext::WebEngineContext() content::PluginService::GetInstance()->GetPlugins(base::Bind(&dummyGetPluginCallback)); #endif -#if BUILDFLAG(ENABLE_BASIC_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) m_printJobManager.reset(new printing::PrintJobManager()); -#endif // defined(ENABLE_BASIC_PRINTING) +#endif content::WebUIControllerFactory::RegisterFactory(WebUIControllerFactoryQt::GetInstance()); } -#if BUILDFLAG(ENABLE_BASIC_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) printing::PrintJobManager* WebEngineContext::getPrintJobManager() { return m_printJobManager.get(); } -#endif // defined(ENABLE_BASIC_PRINTING) +#endif } // namespace |