Files
cef/tests/cefclient/browser/util_mac.h
Marshall Greenblatt faa85bf980 Support JavaScript window.moveTo/By() and resizeTo/By() (fixes #698)
Adds new CefDisplayHandler::OnContentsBoundsChange and
CefDisplayHandler::GetRootWindowScreenRect callbacks.

cefclient: Implement the above callbacks and call
CefBrowserHost::NotifyScreenInfoChanged when the root window
bounds change.

cefclient: osr: Use real screen bounds by default. Pass
`--fake-screen-bounds` for the old default behavior.

Load https://tests/window in cefclient for additional
implementation details and usage examples.
2025-05-05 11:53:33 -04:00

24 lines
712 B
C++

// Copyright (c) 2025 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_TESTS_CEFCLIENT_BROWSER_UTIL_MAC_H_
#define CEF_TESTS_CEFCLIENT_BROWSER_UTIL_MAC_H_
#pragma once
#include <optional>
#include <Cocoa/Cocoa.h>
#include "include/internal/cef_types_wrappers.h"
namespace client {
// Returns the current DIP screen bounds for a visible window in the restored
// position, or nullopt if the window is currently minimized or fullscreen.
std::optional<CefRect> GetWindowBoundsInScreen(NSWindow* window);
} // namespace client
#endif // CEF_TESTS_CEFCLIENT_BROWSER_UTIL_MAC_H_