Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
bruthig
2016/11/17 06:31:20
Where is the ink drop placed in RTL mode? Does th
mohsen
2016/11/17 20:10:12
It's not related to the click point. It's related
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 | 165 |
| 166 TrayCast* GetTrayCastForTesting() const; | 166 TrayCast* GetTrayCastForTesting() const; |
| 167 TrayDate* GetTrayDateForTesting() const; | 167 TrayDate* GetTrayDateForTesting() const; |
| 168 TraySystemInfo* GetTraySystemInfoForTesting() const; | 168 TraySystemInfo* GetTraySystemInfoForTesting() const; |
| 169 TrayTiles* GetTrayTilesForTesting() const; | 169 TrayTiles* GetTrayTilesForTesting() const; |
| 170 TrayUpdate* GetTrayUpdateForTesting() const; | 170 TrayUpdate* GetTrayUpdateForTesting() const; |
| 171 | 171 |
| 172 // Activates the system tray bubble. | 172 // Activates the system tray bubble. |
| 173 void ActivateBubble(); | 173 void ActivateBubble(); |
| 174 | 174 |
| 175 protected: | |
| 176 // Overridden from TrayBackgroundView. | |
| 177 gfx::Insets GetBackgroundInsets() const override; | |
| 178 | |
| 175 private: | 179 private: |
| 176 class ActivationObserver; | 180 class ActivationObserver; |
| 177 | 181 |
| 178 // Closes the bubble. Used to bind as a KeyEventWatcher::KeyEventCallback. | 182 // Closes the bubble. Used to bind as a KeyEventWatcher::KeyEventCallback. |
| 179 void CloseBubble(const ui::KeyEvent& key_event); | 183 void CloseBubble(const ui::KeyEvent& key_event); |
| 180 | 184 |
| 181 // Activates the bubble and starts key navigation with the |key_event|. | 185 // Activates the bubble and starts key navigation with the |key_event|. |
| 182 void ActivateAndStartNavigation(const ui::KeyEvent& key_event); | 186 void ActivateAndStartNavigation(const ui::KeyEvent& key_event); |
| 183 | 187 |
| 184 // Creates the key event watcher. See |ShowItems()| for why key events are | 188 // Creates the key event watcher. See |ShowItems()| for why key events are |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 // Set to true when system notifications should be hidden (e.g. web | 261 // Set to true when system notifications should be hidden (e.g. web |
| 258 // notification bubble is visible). | 262 // notification bubble is visible). |
| 259 bool hide_notifications_; | 263 bool hide_notifications_; |
| 260 | 264 |
| 261 // This is true when the displayed system tray menu is a full tray menu, | 265 // This is true when the displayed system tray menu is a full tray menu, |
| 262 // otherwise a single line item menu like the volume slider is shown. | 266 // otherwise a single line item menu like the volume slider is shown. |
| 263 // Note that the value is only valid when |system_bubble_| is true. | 267 // Note that the value is only valid when |system_bubble_| is true. |
| 264 bool full_system_tray_menu_; | 268 bool full_system_tray_menu_; |
| 265 | 269 |
| 266 // These objects are not owned by this class. | 270 // These objects are not owned by this class. |
| 271 TrayUser* tray_user_active_; | |
|
bruthig
2016/11/17 06:31:20
Consider renaming as |active_tray_user_|.
mohsen
2016/11/17 20:10:12
Not needed anymore. Removed.
| |
| 267 TrayAccessibility* tray_accessibility_; | 272 TrayAccessibility* tray_accessibility_; |
| 268 TrayAudio* tray_audio_; // May be null. | 273 TrayAudio* tray_audio_; // May be null. |
| 269 TrayCast* tray_cast_; | 274 TrayCast* tray_cast_; |
| 270 TrayDate* tray_date_; // null for material design. | 275 TrayDate* tray_date_; // null for material design. |
| 271 TrayTiles* tray_tiles_; // only used in material design. | 276 TrayTiles* tray_tiles_; // only used in material design. |
| 272 TraySystemInfo* tray_system_info_; // only used in material design. | 277 TraySystemInfo* tray_system_info_; // only used in material design. |
| 273 TrayUpdate* tray_update_; | 278 TrayUpdate* tray_update_; |
| 274 | 279 |
| 275 // A reference to the Screen share and capture item. | 280 // A reference to the Screen share and capture item. |
| 276 ScreenTrayItem* screen_capture_tray_item_; // not owned | 281 ScreenTrayItem* screen_capture_tray_item_; // not owned |
| 277 ScreenTrayItem* screen_share_tray_item_; // not owned | 282 ScreenTrayItem* screen_share_tray_item_; // not owned |
| 278 | 283 |
| 279 // TODO(oshima): Remove this when crbug.com/651242 is fixed. | 284 // TODO(oshima): Remove this when crbug.com/651242 is fixed. |
| 280 bool activating_ = false; | 285 bool activating_ = false; |
| 281 | 286 |
| 282 std::unique_ptr<KeyEventWatcher> key_event_watcher_; | 287 std::unique_ptr<KeyEventWatcher> key_event_watcher_; |
| 283 | 288 |
| 284 std::unique_ptr<ActivationObserver> activation_observer_; | 289 std::unique_ptr<ActivationObserver> activation_observer_; |
| 285 | 290 |
| 286 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 291 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
| 287 }; | 292 }; |
| 288 | 293 |
| 289 } // namespace ash | 294 } // namespace ash |
| 290 | 295 |
| 291 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 296 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| OLD | NEW |