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

Unified Diff: ui/display/screen_android.cc

Issue 2688413007: Add display::GetDisplayNearestView (Closed)
Patch Set: updated log 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
Index: ui/display/screen_android.cc
diff --git a/ui/display/screen_android.cc b/ui/display/screen_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a5e5329b1f22cdcbef726cbc5e9bdc25fcd3d964
--- /dev/null
+++ b/ui/display/screen_android.cc
@@ -0,0 +1,22 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/display/screen.h"
+
+#include "base/logging.h"
+
+namespace display {
+
+// static
+gfx::NativeWindow Screen::WindowForView(gfx::NativeView view) {
+ // Android cannot use implement this method here to convert |NativeView|
msw 2017/03/14 23:38:13 nit: "use implement" grammar, missing something?
Jinsuk Kim 2017/03/15 00:46:05 Done.
+ // to |NativeWindow| since it causes cyclic dependency.
+ // |GetDisplayNearestView| should be overriden directly.
+ NOTREACHED() << "|GetDisplayNearestView| on Android should not call "
+ "this method. Classes inheriting |Screen| should override "
+ "|GetDisplayNearestView| directly.";
+ return nullptr;
+}
+
+} // namespace display

Powered by Google App Engine
This is Rietveld 408576698