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

Unified Diff: ash/system/tray/tray_bubble_wrapper.cc

Issue 2085133002: Convert TrayBubbleWrapper to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eventfilter
Patch Set: rebase Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_bubble_wrapper.cc
diff --git a/ash/system/tray/tray_bubble_wrapper.cc b/ash/system/tray/tray_bubble_wrapper.cc
index f904cb210f8833389ded28da5104cb0e643266af..848b568dc82714e222a481b53489cf6b5b6117a9 100644
--- a/ash/system/tray/tray_bubble_wrapper.cc
+++ b/ash/system/tray/tray_bubble_wrapper.cc
@@ -4,12 +4,10 @@
#include "ash/system/tray/tray_bubble_wrapper.h"
+#include "ash/common/wm_lookup.h"
+#include "ash/common/wm_window.h"
#include "ash/system/tray/tray_background_view.h"
#include "ash/system/tray/tray_event_filter.h"
-#include "ash/wm/window_properties.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_event_dispatcher.h"
#include "ui/views/bubble/tray_bubble_view.h"
#include "ui/views/widget/widget.h"
@@ -46,10 +44,8 @@ void TrayBubbleWrapper::OnWidgetDestroying(views::Widget* widget) {
// will invoke PerformAction which reopens the bubble again. To prevent the
// reopen, the mouse capture of |tray_| has to be released.
// See crbug.com/177075
- aura::client::CaptureClient* capture_client = aura::client::GetCaptureClient(
- tray_->GetWidget()->GetNativeView()->GetRootWindow());
- if (capture_client)
- capture_client->ReleaseCapture(tray_->GetWidget()->GetNativeView());
+ WmLookup::Get()->GetWindowForWidget(tray_->GetWidget())->ReleaseCapture();
+
tray_->HideBubbleWithView(bubble_view_); // May destroy |bubble_view_|
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698