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

Unified Diff: ui/views/mus/screen_mus.cc

Issue 2392063003: mus: Use TooltipManagerAura in NativeWidgetMus. (Closed)
Patch Set: add braces Created 4 years, 2 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/views/mus/screen_mus.cc
diff --git a/ui/views/mus/screen_mus.cc b/ui/views/mus/screen_mus.cc
index 84cf5b4dd8b015a1815177116048be224510098e..dcb09f91f9ccd5b9747c98c2d17965100801c9c3 100644
--- a/ui/views/mus/screen_mus.cc
+++ b/ui/views/mus/screen_mus.cc
@@ -11,6 +11,7 @@
#include "services/shell/public/cpp/connection.h"
#include "services/shell/public/cpp/connector.h"
#include "ui/aura/window.h"
+#include "ui/views/mus/native_widget_mus.h"
#include "ui/views/mus/screen_mus_delegate.h"
#include "ui/views/mus/window_manager_frame_values.h"
@@ -81,6 +82,19 @@ bool ScreenMus::IsWindowUnderCursor(gfx::NativeWindow window) {
window->GetBoundsInScreen().Contains(GetCursorScreenPoint());
}
+gfx::NativeWindow ScreenMus::GetWindowAtScreenPoint(const gfx::Point& point) {
+ aura::Window* aura_window = nullptr;
+ ui::Window* ui_window = delegate_->GetWindowAtScreenPoint(point);
+ if (ui_window) {
+ NativeWidgetMus* nw_mus = NativeWidgetMus::GetForWindow(ui_window);
+ if (nw_mus) {
+ aura_window =
+ static_cast<internal::NativeWidgetPrivate*>(nw_mus)->GetNativeView();
+ }
+ }
+ return aura_window;
+}
+
void ScreenMus::OnDisplays(mojo::Array<ui::mojom::WsDisplayPtr> ws_displays) {
// This should only be called once from Init() before any observers have been
// added.

Powered by Google App Engine
This is Rietveld 408576698