#include "base/files/file_path.h"
#include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
#include "ui/events/platform/platform_event_source.h"
+#include "ui/ozone/common/native_display_delegate_ozone.h"
#include "ui/ozone/platform/test/test_window.h"
#include "ui/ozone/platform/test/test_window_manager.h"
#include "ui/ozone/public/cursor_factory_ozone.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/ozone_switches.h"
-#if defined(OS_CHROMEOS)
-#include "ui/ozone/common/chromeos/native_display_delegate_ozone.h"
-#endif
-
namespace ui {
namespace {
class OzonePlatformTest : public OzonePlatform {
public:
OzonePlatformTest(const base::FilePath& dump_file) : file_path_(dump_file) {}
- virtual ~OzonePlatformTest() {}
+ ~OzonePlatformTest() override {}
// OzonePlatform:
- virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE {
+ ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
return window_manager_.get();
}
- virtual CursorFactoryOzone* GetCursorFactoryOzone() OVERRIDE {
+ CursorFactoryOzone* GetCursorFactoryOzone() override {
return cursor_factory_ozone_.get();
}
- virtual GpuPlatformSupport* GetGpuPlatformSupport() OVERRIDE {
+ GpuPlatformSupport* GetGpuPlatformSupport() override {
return gpu_platform_support_.get();
}
- virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() OVERRIDE {
+ GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
return gpu_platform_support_host_.get();
}
- virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
+ scoped_ptr<PlatformWindow> CreatePlatformWindow(
PlatformWindowDelegate* delegate,
- const gfx::Rect& bounds) OVERRIDE {
+ const gfx::Rect& bounds) override {
return make_scoped_ptr<PlatformWindow>(
new TestWindow(delegate, window_manager_.get(), bounds));
}
-
-#if defined(OS_CHROMEOS)
- virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
- OVERRIDE {
+ scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
}
-#endif
- virtual void InitializeUI() OVERRIDE {
+ void InitializeUI() override {
window_manager_.reset(new TestWindowManager(file_path_));
window_manager_->Initialize();
// This unbreaks tests that create their own.
gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
}
- virtual void InitializeGPU() OVERRIDE {
+ void InitializeGPU() override {
gpu_platform_support_.reset(CreateStubGpuPlatformSupport());
}