Chromium Code Reviews| Index: chrome/browser/android/vr_shell/ui_elements/presentation_toast.cc |
| diff --git a/chrome/browser/android/vr_shell/ui_elements/presentation_toast.cc b/chrome/browser/android/vr_shell/ui_elements/presentation_toast.cc |
| index a2b4a87b5c02e1f39bc23b158a34a46c1c41323e..097cd7ad18b75f079c1df83524ef05278dd02900 100644 |
| --- a/chrome/browser/android/vr_shell/ui_elements/presentation_toast.cc |
| +++ b/chrome/browser/android/vr_shell/ui_elements/presentation_toast.cc |
| @@ -9,9 +9,11 @@ |
| namespace vr_shell { |
| -PresentationToast::PresentationToast(int preferred_width) |
| +PresentationToast::PresentationToast(int preferred_width, |
| + const base::TimeDelta& timeout) |
| : TexturedElement(preferred_width), |
| - texture_(base::MakeUnique<PresentationToastTexture>()) {} |
| + texture_(base::MakeUnique<PresentationToastTexture>()), |
| + transience_(this, base::TimeDelta::FromSeconds(10)) {} |
|
bshe
2017/06/27 14:57:09
Use |timeout| instead?
cjgrant
2017/06/28 19:00:54
Done. Oops!
|
| PresentationToast::~PresentationToast() = default; |
| @@ -19,4 +21,8 @@ UiTexture* PresentationToast::GetTexture() const { |
| return texture_.get(); |
| } |
| +void PresentationToast::SetEnabled(bool enabled) { |
| + transience_.SetEnabled(enabled); |
| +} |
| + |
| } // namespace vr_shell |