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

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: Address comments 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 d205b4b04d4f3e9ebcc5b51c010092a52725f658..ad98120a348505588fa198e49e32c3fa7828bc6e 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