2016-01-19 21:09:01 +01:00
|
|
|
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_VIEWS_DISPLAY_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_VIEWS_DISPLAY_IMPL_H_
|
|
|
|
#pragma once
|
|
|
|
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/include/views/cef_display.h"
|
|
|
|
#include "cef/libcef/browser/thread_util.h"
|
2016-05-25 01:35:43 +02:00
|
|
|
#include "ui/display/display.h"
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
class CefDisplayImpl : public CefDisplay {
|
|
|
|
public:
|
2016-05-25 01:35:43 +02:00
|
|
|
explicit CefDisplayImpl(const display::Display& display);
|
2021-12-06 21:40:25 +01:00
|
|
|
|
|
|
|
CefDisplayImpl(const CefDisplayImpl&) = delete;
|
|
|
|
CefDisplayImpl& operator=(const CefDisplayImpl&) = delete;
|
|
|
|
|
2016-01-19 21:09:01 +01:00
|
|
|
~CefDisplayImpl() override;
|
|
|
|
|
|
|
|
// CefDisplay methods:
|
2023-06-01 16:06:15 +02:00
|
|
|
int64_t GetID() override;
|
2016-01-19 21:09:01 +01:00
|
|
|
float GetDeviceScaleFactor() override;
|
|
|
|
void ConvertPointToPixels(CefPoint& point) override;
|
|
|
|
void ConvertPointFromPixels(CefPoint& point) override;
|
|
|
|
CefRect GetBounds() override;
|
|
|
|
CefRect GetWorkArea() override;
|
|
|
|
int GetRotation() override;
|
|
|
|
|
2016-05-25 01:35:43 +02:00
|
|
|
const display::Display& display() const { return display_; }
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
private:
|
2016-05-25 01:35:43 +02:00
|
|
|
display::Display display_;
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefDisplayImpl);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_VIEWS_DISPLAY_IMPL_H_
|