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

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

Issue 2392063003: mus: Use TooltipManagerAura in NativeWidgetMus. (Closed)
Patch Set: Add comment 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
« no previous file with comments | « ui/views/mus/screen_mus.h ('k') | ui/views/mus/screen_mus_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/screen_mus.cc
diff --git a/ui/views/mus/screen_mus.cc b/ui/views/mus/screen_mus.cc
index e25a5e15f5e743ec97d38547aa74fa213ec5c380..c983ae660d5bb0aad2dbe7ced26012811a0b5cf7 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.
« no previous file with comments | « ui/views/mus/screen_mus.h ('k') | ui/views/mus/screen_mus_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698