platform_window_delegate.cc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ui/platform_window/platform_window_delegate.h"
  5. #include "base/notreached.h"
  6. #include "third_party/skia/include/core/SkPath.h"
  7. #include "ui/gfx/geometry/point_f.h"
  8. #include "ui/gfx/geometry/size.h"
  9. namespace ui {
  10. PlatformWindowDelegate::PlatformWindowDelegate() = default;
  11. PlatformWindowDelegate::~PlatformWindowDelegate() = default;
  12. absl::optional<gfx::Size> PlatformWindowDelegate::GetMinimumSizeForWindow() {
  13. return absl::nullopt;
  14. }
  15. absl::optional<gfx::Size> PlatformWindowDelegate::GetMaximumSizeForWindow() {
  16. return absl::nullopt;
  17. }
  18. SkPath PlatformWindowDelegate::GetWindowMaskForWindowShapeInPixels() {
  19. return SkPath();
  20. }
  21. void PlatformWindowDelegate::OnSurfaceFrameLockingChanged(bool lock) {}
  22. absl::optional<MenuType> PlatformWindowDelegate::GetMenuType() {
  23. return absl::nullopt;
  24. }
  25. void PlatformWindowDelegate::OnOcclusionStateChanged(
  26. PlatformWindowOcclusionState occlusion_state) {}
  27. absl::optional<OwnedWindowAnchor>
  28. PlatformWindowDelegate::GetOwnedWindowAnchorAndRectInDIP() {
  29. return absl::nullopt;
  30. }
  31. void PlatformWindowDelegate::SetFrameRateThrottleEnabled(bool enabled) {}
  32. gfx::Rect PlatformWindowDelegate::ConvertRectToPixels(
  33. const gfx::Rect& rect_in_dip) const {
  34. return rect_in_dip;
  35. }
  36. gfx::Rect PlatformWindowDelegate::ConvertRectToDIP(
  37. const gfx::Rect& rect_in_pixels) const {
  38. return rect_in_pixels;
  39. }
  40. gfx::PointF PlatformWindowDelegate::ConvertScreenPointToLocalDIP(
  41. const gfx::Point& screen_in_pixels) const {
  42. return gfx::PointF(screen_in_pixels);
  43. }
  44. } // namespace ui