| 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_|
|
| }
|
|
|
|
|