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

Unified Diff: ash/common/system/chromeos/palette/palette_tray.cc

Issue 2276233002: ash/chromeos: Add shift-alt-p shortcut to open palette. (Closed)
Patch Set: Initial upload Created 4 years, 4 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
Index: ash/common/system/chromeos/palette/palette_tray.cc
diff --git a/ash/common/system/chromeos/palette/palette_tray.cc b/ash/common/system/chromeos/palette/palette_tray.cc
index be92beccd1d7b8ca50c3fad62c4b15a9e2603116..3c1d9cc19b3a0a0e917bda7be8a7ebc0915df6af 100644
--- a/ash/common/system/chromeos/palette/palette_tray.cc
+++ b/ash/common/system/chromeos/palette/palette_tray.cc
@@ -171,6 +171,9 @@ bool PaletteTray::PerformAction(const ui::Event& event) {
}
bool PaletteTray::OpenBubble() {
+ if (bubble_)
+ return false;
+
views::TrayBubbleView::InitParams init_params(
views::TrayBubbleView::ANCHOR_TYPE_TRAY, GetAnchorAlignment(),
kPaletteWidth, kPaletteWidth);
@@ -196,7 +199,6 @@ bool PaletteTray::OpenBubble() {
bubble_.reset(new ash::TrayBubbleWrapper(this, bubble_view));
SetDrawBackgroundAsActive(true);
-
return true;
}

Powered by Google App Engine
This is Rietveld 408576698