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

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

Issue 2092473002: Convert TrayBubbleView to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@traybubblewrapper
Patch Set: review feedback 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 | « ash/system/tray/system_tray.h ('k') | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b501fb1504d18d11d67cbd246a6eec01a0551875 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"
@@ -691,6 +694,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);
}
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698