[1/5] per-window-scale: Introduce the new API

This adds the new API as per the design proposed in the document linked
below. There's no behavioral change so far, as both the API
implementation for ozone/wayland and the migration of the call-sites
will be done in child CLs.

Design document:
https://docs.google.com/document/d/1MwvHLrGl5DmODVwt8_iyHEzrn7B5JqC_ABoDP2KUxb0

Bug: 336007385
Change-Id: Id12a07907095ad866dcc397e677fc6a79f448235
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5591429
Commit-Queue: Nick Yamane <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1313063}
diff --git a/ui/android/display_android_manager.h b/ui/android/display_android_manager.h
index aecd5dc..5dda57db 100644
--- a/ui/android/display_android_manager.h
+++ b/ui/android/display_android_manager.h
@@ -7,6 +7,8 @@
 
 #include <jni.h>
 
+#include <optional>
+
 #include "base/android/jni_android.h"
 #include "ui/display/screen_base.h"
 #include "ui/gfx/geometry/size.h"
@@ -31,6 +33,8 @@
       const gfx::Point& point) const override;
   display::Display GetDisplayMatching(
       const gfx::Rect& match_rect) const override;
+  std::optional<float> GetPreferredScaleFactorForView(
+      gfx::NativeView view) const override;
 
   // Methods called from Java.