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

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

Issue 2948223002: Revert of Do not activate TrayBubbleView by default (Closed)
Patch Set: 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
« no previous file with comments | « ash/system/palette/palette_tray.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.h
diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h
index 8483db9220a9666d30524d588ae785b695d249d9..fa16c53f74067aaee8e1eacaccff91add8d1d17d 100644
--- a/ash/system/tray/system_tray.h
+++ b/ash/system/tray/system_tray.h
@@ -18,6 +18,7 @@
namespace ash {
+class KeyEventWatcher;
enum class LoginStatus;
class ScreenTrayItem;
class SystemBubbleWrapper;
@@ -132,12 +133,7 @@
void BubbleViewDestroyed() override;
void OnMouseEnteredView() override;
void OnMouseExitedView() override;
- void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators,
- views::TrayBubbleView* tray_bubble_view) override;
- void UnregisterAllAccelerators(
- views::TrayBubbleView* tray_bubble_view) override;
base::string16 GetAccessibleNameForBubble() override;
- bool ShouldEnableExtraKeyboardAccessibility() override;
void HideBubble(const views::TrayBubbleView* bubble_view) override;
ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; }
@@ -155,6 +151,10 @@
// Activates the bubble and starts key navigation with the |key_event|.
void ActivateAndStartNavigation(const ui::KeyEvent& key_event);
+
+ // Creates the key event watcher. See |ShowItems()| for why key events are
+ // observed.
+ void CreateKeyEventWatcher();
// Creates the default set of items for the sytem tray.
void CreateItems(SystemTrayDelegate* delegate);
@@ -232,6 +232,8 @@
ScreenTrayItem* screen_capture_tray_item_ = nullptr; // not owned
ScreenTrayItem* screen_share_tray_item_ = nullptr; // not owned
+ std::unique_ptr<KeyEventWatcher> key_event_watcher_;
+
std::unique_ptr<ActivationObserver> activation_observer_;
DISALLOW_COPY_AND_ASSIGN(SystemTray);
« no previous file with comments | « ash/system/palette/palette_tray.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698