diff --git a/src/dawn/native/opengl/ContextEGL.h b/src/dawn/native/opengl/ContextEGL.h
index 8252fa1..dc55aad 100644
--- a/src/dawn/native/opengl/ContextEGL.h
+++ b/src/dawn/native/opengl/ContextEGL.h
@@ -30,23 +30,25 @@
 
 #include <memory>
 
+#include "dawn/common/NonMovable.h"
 #include "dawn/common/egl_platform.h"
 #include "dawn/native/opengl/DeviceGL.h"
 #include "dawn/native/opengl/EGLFunctions.h"
 
 namespace dawn::native::opengl {
 
-class ContextEGL : public Device::Context {
+class ContextEGL : NonMovable {
   public:
     static ResultOrError<std::unique_ptr<ContextEGL>> Create(const EGLFunctions& functions,
                                                              EGLenum api,
                                                              EGLDisplay display,
                                                              bool useANGLETextureSharing);
-    void MakeCurrent() override;
-    EGLDisplay GetEGLDisplay() const override;
-    const EGLFunctions& GetEGL() const override;
-    const EGLExtensionSet& GetExtensions() const override;
-    ~ContextEGL() override;
+    ~ContextEGL();
+
+    void MakeCurrent();
+    EGLDisplay GetEGLDisplay() const;
+    const EGLFunctions& GetEGL() const;
+    const EGLExtensionSet& GetExtensions() const;
 
   private:
     ContextEGL(const EGLFunctions& functions,
diff --git a/src/dawn/native/opengl/DeviceGL.cpp b/src/dawn/native/opengl/DeviceGL.cpp
index 6195811..2846706 100644
--- a/src/dawn/native/opengl/DeviceGL.cpp
+++ b/src/dawn/native/opengl/DeviceGL.cpp
@@ -39,6 +39,7 @@
 #include "dawn/native/opengl/BufferGL.h"
 #include "dawn/native/opengl/CommandBufferGL.h"
 #include "dawn/native/opengl/ComputePipelineGL.h"
+#include "dawn/native/opengl/ContextEGL.h"
 #include "dawn/native/opengl/PipelineLayoutGL.h"
 #include "dawn/native/opengl/QuerySetGL.h"
 #include "dawn/native/opengl/QueueGL.h"
@@ -121,7 +122,7 @@
 ResultOrError<Ref<Device>> Device::Create(AdapterBase* adapter,
                                           const UnpackedPtr<DeviceDescriptor>& descriptor,
                                           const OpenGLFunctions& functions,
-                                          std::unique_ptr<Context> context,
+                                          std::unique_ptr<ContextEGL> context,
                                           const TogglesState& deviceToggles,
                                           Ref<DeviceBase::DeviceLostEvent>&& lostEvent) {
     Ref<Device> device = AcquireRef(new Device(adapter, descriptor, functions, std::move(context),
@@ -133,7 +134,7 @@
 Device::Device(AdapterBase* adapter,
                const UnpackedPtr<DeviceDescriptor>& descriptor,
                const OpenGLFunctions& functions,
-               std::unique_ptr<Context> context,
+               std::unique_ptr<ContextEGL> context,
                const TogglesState& deviceToggles,
                Ref<DeviceBase::DeviceLostEvent>&& lostEvent)
     : DeviceBase(adapter, descriptor, deviceToggles, std::move(lostEvent)),
@@ -451,4 +452,8 @@
     return mContext->GetEGLDisplay();
 }
 
+ContextEGL* Device::GetContext() const {
+    return mContext.get();
+}
+
 }  // namespace dawn::native::opengl
diff --git a/src/dawn/native/opengl/DeviceGL.h b/src/dawn/native/opengl/DeviceGL.h
index e252bda..e809b71 100644
--- a/src/dawn/native/opengl/DeviceGL.h
+++ b/src/dawn/native/opengl/DeviceGL.h
@@ -46,6 +46,7 @@
 
 namespace dawn::native::opengl {
 
+class ContextEGL;
 struct EGLFunctions;
 
 enum class EGLExtension {
@@ -64,19 +65,21 @@
     static ResultOrError<Ref<Device>> Create(AdapterBase* adapter,
                                              const UnpackedPtr<DeviceDescriptor>& descriptor,
                                              const OpenGLFunctions& functions,
-                                             std::unique_ptr<Context> context,
+                                             std::unique_ptr<ContextEGL> context,
                                              const TogglesState& deviceToggles,
                                              Ref<DeviceBase::DeviceLostEvent>&& lostEvent);
     ~Device() override;
 
     MaybeError Initialize(const UnpackedPtr<DeviceDescriptor>& descriptor);
 
-    // Returns all the OpenGL entry points and ensures that the associated
-    // Context is current.
+    // Returns all the OpenGL entry points and ensures that the associated GL context is current.
     const OpenGLFunctions& GetGL() const;
+
+    // Helper functions to get access to relevant EGL objects.
     const EGLFunctions& GetEGL(bool makeCurrent) const;
     const EGLExtensionSet& GetEGLExtensions() const;
     EGLDisplay GetEGLDisplay() const;
+    ContextEGL* GetContext() const;
 
     const GLFormat& GetGLFormat(const Format& format);
 
@@ -113,21 +116,11 @@
     bool MayRequireDuplicationOfIndirectParameters() const override;
     bool ShouldApplyIndexBufferOffsetToFirstIndex() const override;
 
-    class Context {
-      public:
-        virtual ~Context() {}
-        virtual void MakeCurrent() = 0;
-        // TODO(dawn:2544) Abstract EGL-isms for use with desktop GL.
-        virtual EGLDisplay GetEGLDisplay() const = 0;
-        virtual const EGLFunctions& GetEGL() const = 0;
-        virtual const EGLExtensionSet& GetExtensions() const = 0;
-    };
-
   private:
     Device(AdapterBase* adapter,
            const UnpackedPtr<DeviceDescriptor>& descriptor,
            const OpenGLFunctions& functions,
-           std::unique_ptr<Context> context,
+           std::unique_ptr<ContextEGL> context,
            const TogglesState& deviceToggles,
            Ref<DeviceBase::DeviceLostEvent>&& lostEvent);
 
@@ -166,7 +159,7 @@
     const OpenGLFunctions mGL;
 
     GLFormatTable mFormatTable;
-    std::unique_ptr<Context> mContext = nullptr;
+    std::unique_ptr<ContextEGL> mContext = nullptr;
     int mMaxTextureMaxAnisotropy = 0;
 };
 
diff --git a/src/dawn/native/opengl/PhysicalDeviceGL.cpp b/src/dawn/native/opengl/PhysicalDeviceGL.cpp
index 29af3d7..f67b564 100644
--- a/src/dawn/native/opengl/PhysicalDeviceGL.cpp
+++ b/src/dawn/native/opengl/PhysicalDeviceGL.cpp
@@ -407,7 +407,6 @@
     Ref<DeviceBase::DeviceLostEvent>&& lostEvent) {
     EGLenum api =
         GetBackendType() == wgpu::BackendType::OpenGL ? EGL_OPENGL_API : EGL_OPENGL_ES_API;
-    std::unique_ptr<Device::Context> context;
     bool useANGLETextureSharing = false;
     for (size_t i = 0; i < descriptor->requiredFeatureCount; ++i) {
         if (descriptor->requiredFeatures[i] == wgpu::FeatureName::ANGLETextureSharing) {
@@ -415,8 +414,10 @@
         }
     }
 
+    std::unique_ptr<ContextEGL> context;
     DAWN_TRY_ASSIGN(context,
                     ContextEGL::Create(mEGLFunctions, api, mDisplay, useANGLETextureSharing));
+
     return Device::Create(adapter, descriptor, mFunctions, std::move(context), deviceToggles,
                           std::move(lostEvent));
 }
