| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 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_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 6 #define ASH_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> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 void BubbleViewDestroyed() override; | 135 void BubbleViewDestroyed() override; |
| 136 void OnMouseEnteredView() override; | 136 void OnMouseEnteredView() override; |
| 137 void OnMouseExitedView() override; | 137 void OnMouseExitedView() override; |
| 138 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators, | 138 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators, |
| 139 views::TrayBubbleView* tray_bubble_view) override; | 139 views::TrayBubbleView* tray_bubble_view) override; |
| 140 void UnregisterAllAccelerators( | 140 void UnregisterAllAccelerators( |
| 141 views::TrayBubbleView* tray_bubble_view) override; | 141 views::TrayBubbleView* tray_bubble_view) override; |
| 142 base::string16 GetAccessibleNameForBubble() override; | 142 base::string16 GetAccessibleNameForBubble() override; |
| 143 bool ShouldEnableExtraKeyboardAccessibility() override; | 143 bool ShouldEnableExtraKeyboardAccessibility() override; |
| 144 void HideBubble(const views::TrayBubbleView* bubble_view) override; | 144 void HideBubble(const views::TrayBubbleView* bubble_view) override; |
| 145 bool ProcessGestureEventOnBubbleView(ui::GestureEvent* event, |
| 146 View* target) override; |
| 145 | 147 |
| 146 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; } | 148 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; } |
| 147 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; } | 149 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; } |
| 148 | 150 |
| 149 // Activates the system tray bubble. | 151 // Activates the system tray bubble. |
| 150 void ActivateBubble(); | 152 void ActivateBubble(); |
| 151 | 153 |
| 152 // ui::EventHandler: | 154 // ui::EventHandler: |
| 153 void OnGestureEvent(ui::GestureEvent* event) override; | 155 void OnGestureEvent(ui::GestureEvent* event) override; |
| 154 | 156 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // The original bounds of the system tray bubble. | 227 // The original bounds of the system tray bubble. |
| 226 gfx::Rect system_tray_bubble_bounds_; | 228 gfx::Rect system_tray_bubble_bounds_; |
| 227 | 229 |
| 228 // Tracks the amount of the drag. Only valid if |is_in_drag_| is true. | 230 // Tracks the amount of the drag. Only valid if |is_in_drag_| is true. |
| 229 float gesture_drag_amount_ = 0.f; | 231 float gesture_drag_amount_ = 0.f; |
| 230 | 232 |
| 231 // True if the user is in the process of gesture-dragging to open the system | 233 // True if the user is in the process of gesture-dragging to open the system |
| 232 // tray bubble, false otherwise. | 234 // tray bubble, false otherwise. |
| 233 bool is_in_drag_ = false; | 235 bool is_in_drag_ = false; |
| 234 | 236 |
| 237 // The target view that the sequence of scroll events happened on. |
| 238 View* target_view_; |
| 239 |
| 235 // The web notification tray view that appears adjacent to this view. | 240 // The web notification tray view that appears adjacent to this view. |
| 236 WebNotificationTray* web_notification_tray_ = nullptr; | 241 WebNotificationTray* web_notification_tray_ = nullptr; |
| 237 | 242 |
| 238 // Items. | 243 // Items. |
| 239 std::vector<std::unique_ptr<SystemTrayItem>> items_; | 244 std::vector<std::unique_ptr<SystemTrayItem>> items_; |
| 240 | 245 |
| 241 // Pointers to members of |items_|. | 246 // Pointers to members of |items_|. |
| 242 SystemTrayItem* detailed_item_ = nullptr; | 247 SystemTrayItem* detailed_item_ = nullptr; |
| 243 | 248 |
| 244 // Bubble for default and detailed views. | 249 // Bubble for default and detailed views. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 272 ScreenTrayItem* screen_share_tray_item_ = nullptr; // not owned | 277 ScreenTrayItem* screen_share_tray_item_ = nullptr; // not owned |
| 273 | 278 |
| 274 std::unique_ptr<ActivationObserver> activation_observer_; | 279 std::unique_ptr<ActivationObserver> activation_observer_; |
| 275 | 280 |
| 276 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 281 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
| 277 }; | 282 }; |
| 278 | 283 |
| 279 } // namespace ash | 284 } // namespace ash |
| 280 | 285 |
| 281 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 286 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| OLD | NEW |