diff --git a/src/core/ozone_platform_eglfs.cpp b/src/core/ozone_platform_eglfs.cpp
index f646ac2a6fc00f48f62f1e5d0ad93e06357760e4..43a3e4a116eabacfdb8a29c6ce8488b31857b793 100644
--- a/src/core/ozone_platform_eglfs.cpp
+++ b/src/core/ozone_platform_eglfs.cpp
@@ -175,7 +175,7 @@ void OzonePlatformEglfs::InitializeUI() {
 }
 
 void OzonePlatformEglfs::InitializeGPU() {
-  surface_factory_ozone_.reset(new SurfaceFactoryQt());
+  surface_factory_ozone_.reset(new QtWebEngineCore::SurfaceFactoryQt());
   gpu_platform_support_.reset(CreateStubGpuPlatformSupport());
 }
 
diff --git a/src/core/ozone_platform_eglfs.h b/src/core/ozone_platform_eglfs.h
index 2371bb1e89883d040f8f38a6602d61a3d5b09831..6954595dd59298b5b83abe5ecdb2a5e72d990334 100644
--- a/src/core/ozone_platform_eglfs.h
+++ b/src/core/ozone_platform_eglfs.h
@@ -68,7 +68,7 @@ class OzonePlatformEglfs : public OzonePlatform {
   virtual void InitializeGPU() override;
   scoped_ptr<DeviceManager> device_manager_;
 
-  scoped_ptr<SurfaceFactoryQt> surface_factory_ozone_;
+  scoped_ptr<QtWebEngineCore::SurfaceFactoryQt> surface_factory_ozone_;
   scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
   scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
 
diff --git a/src/core/surface_factory_qt.cpp b/src/core/surface_factory_qt.cpp
index d5cb78f29f9173460bf39368ca0da8ebef2559f9..963f7b51754363a6cfffff9482f1c7cc5f2199c9 100644
--- a/src/core/surface_factory_qt.cpp
+++ b/src/core/surface_factory_qt.cpp
@@ -75,13 +75,13 @@ bool SurfaceFactoryQt::LoadEGLGLES2Bindings(AddGLLibraryCallback add_gl_library,
     Q_UNREACHABLE();
     return false;
 #else
-    base::FilePath libEGLPath = toFilePath(QT_LIBDIR_EGL);
+    base::FilePath libEGLPath = QtWebEngineCore::toFilePath(QT_LIBDIR_EGL);
     libEGLPath = libEGLPath.Append("libEGL.so");
     base::NativeLibrary eglLibrary = LoadLibrary(libEGLPath);
     if (!eglLibrary)
         return false;
 
-    base::FilePath libGLES2Path = toFilePath(QT_LIBDIR_GLES2);
+    base::FilePath libGLES2Path = QtWebEngineCore::toFilePath(QT_LIBDIR_GLES2);
     libGLES2Path = libGLES2Path.Append("libGLESv2.so");
     base::NativeLibrary gles2Library = LoadLibrary(libGLES2Path);
     if (!gles2Library)
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index 8b83856b06c7421ece0efa2f931734988523455f..f4ec573425110ee357207f9e351f84675d237930 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -43,6 +43,7 @@
 #include <QAuthenticator>
 #include <QClipboard>
 #include <QFileDialog>
+#include <QKeyEvent>
 #include <QIcon>
 #include <QInputDialog>
 #include <QLayout>