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

Unified Diff: ash/mus/sysui_application.cc

Issue 1863523006: mash: Make system tray bubble close when another window is activated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 8 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 | mash/wm/public/interfaces/container.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/sysui_application.cc
diff --git a/ash/mus/sysui_application.cc b/ash/mus/sysui_application.cc
index 92302485d160fb25dfd6b507f008afd9812dc1ea..836d6a231375b26480fbcc51ab26ac6584b5de2e 100644
--- a/ash/mus/sysui_application.cc
+++ b/ash/mus/sysui_application.cc
@@ -48,7 +48,6 @@ namespace {
// Tries to determine the corresponding mash container from widget init params.
mash::wm::mojom::Container GetContainerId(
const views::Widget::InitParams& params) {
- DCHECK(params.parent);
const int id = params.parent->id();
if (id == kShellWindowId_DesktopBackgroundContainer)
return mash::wm::mojom::Container::USER_BACKGROUND;
@@ -58,16 +57,17 @@ mash::wm::mojom::Container GetContainerId(
return mash::wm::mojom::Container::USER_SHELF;
}
- // Show mash shelf tooltips and settings bubbles in the menu container.
- if (params.type == views::Widget::InitParams::Type::TYPE_MENU ||
- params.type == views::Widget::InitParams::Type::TYPE_BUBBLE) {
- return mash::wm::mojom::Container::MENUS;
+ // Determine the container based on Widget type.
+ switch (params.type) {
+ case views::Widget::InitParams::Type::TYPE_BUBBLE:
+ return mash::wm::mojom::Container::BUBBLES;
+ case views::Widget::InitParams::Type::TYPE_MENU:
+ return mash::wm::mojom::Container::MENUS;
+ case views::Widget::InitParams::Type::TYPE_TOOLTIP:
+ return mash::wm::mojom::Container::TOOLTIPS;
+ default:
+ return mash::wm::mojom::Container::COUNT;
}
-
- if (params.type == views::Widget::InitParams::Type::TYPE_TOOLTIP)
- return mash::wm::mojom::Container::TOOLTIPS;
-
- return mash::wm::mojom::Container::COUNT;
}
// Tries to determine the corresponding ash window type from the ash container
« no previous file with comments | « no previous file | mash/wm/public/interfaces/container.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698