| Index: ash/common/system/tray/system_tray_item.h
|
| diff --git a/ash/common/system/tray/system_tray_item.h b/ash/common/system/tray/system_tray_item.h
|
| index c1e6aaba425844280a9c054f7770a1e762d53782..854bd2342aca980214e68f97285ecf80d60968e0 100644
|
| --- a/ash/common/system/tray/system_tray_item.h
|
| +++ b/ash/common/system/tray/system_tray_item.h
|
| @@ -5,11 +5,17 @@
|
| #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
|
| #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
|
|
|
| +#include <memory>
|
| +
|
| #include "ash/ash_export.h"
|
| #include "ash/common/login_status.h"
|
| #include "ash/public/cpp/shelf_types.h"
|
| #include "base/macros.h"
|
|
|
| +namespace base {
|
| +class OneShotTimer;
|
| +} // namespace base
|
| +
|
| namespace views {
|
| class View;
|
| }
|
| @@ -105,8 +111,9 @@ class ASH_EXPORT SystemTrayItem {
|
| // currently visible, then making this call would use the existing window to
|
| // display the detailed item. The detailed item will inherit the bounds of the
|
| // existing window.
|
| - // If there is no existing view, then this is equivalent to calling
|
| - // PopupDetailedView(0, true).
|
| + //
|
| + // In Material Design the actual transition is intentionally delayed to allow
|
| + // the user to perceive the ink drop animation on the clicked target.
|
| void TransitionDetailedView();
|
|
|
| // Pops up the detailed view for this item. An item can request to show its
|
| @@ -142,6 +149,9 @@ class ASH_EXPORT SystemTrayItem {
|
| void set_restore_focus(bool restore_focus) { restore_focus_ = restore_focus; }
|
|
|
| private:
|
| + // Actually transitions to the detailed view.
|
| + void DoTransitionToDetailedView();
|
| +
|
| // Accesses uma_type().
|
| friend class SystemTrayBubble;
|
|
|
| @@ -151,6 +161,9 @@ class ASH_EXPORT SystemTrayItem {
|
| UmaType uma_type_;
|
| bool restore_focus_;
|
|
|
| + // Used to delay the transition to the detailed view.
|
| + std::unique_ptr<base::OneShotTimer> transition_delay_timer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(SystemTrayItem);
|
| };
|
|
|
|
|