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

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

Issue 2897553002: Do not activate TrayBubbleView by default (Closed)
Patch Set: Add comment. Created 3 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
Index: ash/system/palette/palette_tray.cc
diff --git a/ash/system/palette/palette_tray.cc b/ash/system/palette/palette_tray.cc
index e82b4e73dea904ed2a31469449fd835cd4dbc728..9eeca44ef12401445d568fcc2b58afb19bd0d3f3 100644
--- a/ash/system/palette/palette_tray.cc
+++ b/ash/system/palette/palette_tray.cc
@@ -4,6 +4,8 @@
#include "ash/system/palette/palette_tray.h"
+#include "ash/accelerators/accelerator_controller.h"
+#include "ash/accessibility_delegate.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/root_window_controller.h"
#include "ash/session/session_controller.h"
@@ -155,7 +157,7 @@ PaletteTray::PaletteTray(Shelf* shelf)
PaletteTray::~PaletteTray() {
if (bubble_)
- bubble_->bubble_view()->reset_delegate();
+ bubble_->bubble_view()->ResetDelegate();
ui::InputDeviceManager::GetInstance()->RemoveObserver(this);
Shell::Get()->RemoveShellObserver(this);
@@ -299,10 +301,26 @@ void PaletteTray::OnMouseEnteredView() {}
void PaletteTray::OnMouseExitedView() {}
+void PaletteTray::RegisterAccelerators(
+ const std::vector<ui::Accelerator>& accelerators,
+ views::TrayBubbleView* tray_bubble_view) {
+ Shell::Get()->accelerator_controller()->Register(accelerators,
+ tray_bubble_view);
+}
+
+void PaletteTray::UnregisterAllAccelerators(
+ views::TrayBubbleView* tray_bubble_view) {
+ Shell::Get()->accelerator_controller()->UnregisterAll(tray_bubble_view);
+}
+
base::string16 PaletteTray::GetAccessibleNameForBubble() {
return GetAccessibleNameForTray();
}
+bool PaletteTray::ShouldEnableExtraKeyboardAccessibility() {
+ return Shell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled();
+}
+
void PaletteTray::HideBubble(const views::TrayBubbleView* bubble_view) {
HideBubbleWithView(bubble_view);
}

Powered by Google App Engine
This is Rietveld 408576698