Index: ash/system/tray/system_tray.cc |
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc |
index e5e0fdf0a2c89c1ac2d7b7435e1fcbf384bef624..53d1b86f2f464503272c0b4ede4cc7e9ca6b1d2d 100644 |
--- a/ash/system/tray/system_tray.cc |
+++ b/ash/system/tray/system_tray.cc |
@@ -15,7 +15,10 @@ |
#include "ash/common/system/tray/tray_constants.h" |
#include "ash/common/system/tray_accessibility.h" |
#include "ash/common/system/update/tray_update.h" |
+#include "ash/common/wm_lookup.h" |
+#include "ash/common/wm_root_window_controller.h" |
#include "ash/common/wm_shell.h" |
+#include "ash/common/wm_window.h" |
#include "ash/metrics/user_metrics_recorder.h" |
#include "ash/shell.h" |
#include "ash/system/audio/tray_audio.h" |
@@ -663,6 +666,8 @@ void SystemTray::ClickedOutsideBubble() { |
HideBubbleWithView(system_bubble_->bubble_view()); |
} |
+// views::TrayBubbleView::Delegate overrides: |
msw
2016/06/22 23:00:23
nit: I'm not a big fan unless the file is consiste
James Cook
2016/06/22 23:06:28
Removed.
|
+ |
void SystemTray::BubbleViewDestroyed() { |
if (system_bubble_) { |
system_bubble_->bubble()->DestroyItemViews(); |
@@ -691,6 +696,18 @@ gfx::Rect SystemTray::GetAnchorRect( |
return GetBubbleAnchorRect(anchor_widget, anchor_type, anchor_alignment); |
} |
+void SystemTray::OnBeforeBubbleWidgetInit( |
+ views::Widget* anchor_widget, |
+ views::Widget* bubble_widget, |
+ views::Widget::InitParams* params) const { |
+ // Place the bubble in the same root window as |anchor_widget|. |
+ WmLookup::Get() |
+ ->GetWindowForWidget(anchor_widget) |
+ ->GetRootWindowController() |
+ ->ConfigureWidgetInitParamsForContainer( |
+ bubble_widget, kShellWindowId_SettingBubbleContainer, params); |
+} |
+ |
void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { |
HideBubbleWithView(bubble_view); |
} |