Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: ui/android/display_android_manager.cc

Issue 2751833004: Reland "Add display::GetDisplayNearestView" (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/android/display_android_manager.h ('k') | ui/android/dummy_screen_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/display_android_manager.cc
diff --git a/ui/android/display_android_manager.cc b/ui/android/display_android_manager.cc
index 5e467c6877ae9cb6aa2f4e523739d5a2cfc9bb42..af0bae94a854886b42e981cab32cfe70f70e5c69 100644
--- a/ui/android/display_android_manager.cc
+++ b/ui/android/display_android_manager.cc
@@ -42,8 +42,7 @@ DisplayAndroidManager::~DisplayAndroidManager() {}
// Screen interface.
Display DisplayAndroidManager::GetDisplayNearestWindow(
- gfx::NativeView view) const {
- ui::WindowAndroid* window = view ? view->GetWindowAndroid() : nullptr;
+ gfx::NativeWindow window) const {
if (window) {
DisplayList::Displays::const_iterator it =
display_list().FindDisplayById(window->display_id());
@@ -54,6 +53,11 @@ Display DisplayAndroidManager::GetDisplayNearestWindow(
return GetPrimaryDisplay();
}
+Display DisplayAndroidManager::GetDisplayNearestView(
+ gfx::NativeView view) const {
+ return GetDisplayNearestWindow(view ? view->GetWindowAndroid() : nullptr);
+}
+
// There is no notion of relative display positions on Android.
Display DisplayAndroidManager::GetDisplayNearestPoint(
const gfx::Point& point) const {
« no previous file with comments | « ui/android/display_android_manager.h ('k') | ui/android/dummy_screen_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698