Commit 3cb32697 authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

ozone: Make CreateScreen pure virtual.

We have all the Ozone platforms implementing the PlatformScreen.

Now, it's the time to make that method pure virtual.

However, there is one point - Ozone/Drm and Cast do not support
PlatformScreen, but still implement it and expect that the
method is not reached.

Bug: 872339
Change-Id: I628878842294a8e99033893a9be42026066c29c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869004Reviewed-by: default avatarMichael Spang <spang@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#712927}
parent 117eba4e
......@@ -27,6 +27,7 @@
#include "ui/ozone/public/gpu_platform_support_host.h"
#include "ui/ozone/public/input_controller.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/platform_screen.h"
#include "ui/ozone/public/system_input_injector.h"
#include "ui/platform_window/platform_window_init_properties.h"
......@@ -87,6 +88,10 @@ class OzonePlatformCast : public OzonePlatform {
InputController* GetInputController() override {
return event_factory_ozone_->input_controller();
}
std::unique_ptr<PlatformScreen> CreateScreen() override {
NOTREACHED();
return nullptr;
}
GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
return gpu_platform_support_host_.get();
}
......
......@@ -12,6 +12,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/platform_thread.h"
......@@ -49,6 +50,7 @@
#include "ui/ozone/public/mojom/drm_device.mojom.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/ozone_switches.h"
#include "ui/ozone/public/platform_screen.h"
#include "ui/platform_window/platform_window_init_properties.h"
#if BUILDFLAG(USE_XKBCOMMON)
......@@ -94,6 +96,11 @@ class OzonePlatformGbm : public OzonePlatform {
}
}
std::unique_ptr<PlatformScreen> CreateScreen() override {
NOTREACHED();
return nullptr;
}
GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
if (using_mojo_) {
return drm_device_connector_.get();
......
......@@ -82,10 +82,6 @@ IPC::MessageFilter* OzonePlatform::GetGpuMessageFilter() {
return nullptr;
}
std::unique_ptr<PlatformScreen> OzonePlatform::CreateScreen() {
return nullptr;
}
PlatformClipboard* OzonePlatform::GetPlatformClipboard() {
// Platforms that support system clipboard must override this method.
return nullptr;
......
......@@ -155,7 +155,7 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {
PlatformWindowInitProperties properties) = 0;
virtual std::unique_ptr<display::NativeDisplayDelegate>
CreateNativeDisplayDelegate() = 0;
virtual std::unique_ptr<PlatformScreen> CreateScreen();
virtual std::unique_ptr<PlatformScreen> CreateScreen() = 0;
virtual PlatformClipboard* GetPlatformClipboard();
virtual std::unique_ptr<InputMethod> CreateInputMethod(
internal::InputMethodDelegate* delegate) = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment