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

Unified Diff: chrome/browser/android/vr_shell/ui_elements/presentation_toast.h

Issue 2955023002: VR: Factor transient timing out of UiSceneManager. (Closed)
Patch Set: Get rid of EndVisibility(). 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
Index: chrome/browser/android/vr_shell/ui_elements/presentation_toast.h
diff --git a/chrome/browser/android/vr_shell/ui_elements/presentation_toast.h b/chrome/browser/android/vr_shell/ui_elements/presentation_toast.h
index f131798bf31c26d734366773fa12f4dc12c796c0..729d15eb279048440d9c3e91df9706fec2806b88 100644
--- a/chrome/browser/android/vr_shell/ui_elements/presentation_toast.h
+++ b/chrome/browser/android/vr_shell/ui_elements/presentation_toast.h
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "chrome/browser/android/vr_shell/ui_elements/textured_element.h"
+#include "chrome/browser/android/vr_shell/ui_elements/transience_manager.h"
namespace vr_shell {
@@ -18,13 +19,18 @@ class UiTexture;
// insecure_content_transient_texture. Consider refactor(see crbug.com/735166).
class PresentationToast : public TexturedElement {
public:
- explicit PresentationToast(int preferred_width);
+ PresentationToast(int preferred_width, const base::TimeDelta& timeout);
~PresentationToast() override;
+ TransienceManager* transience() { return &transience_; }
+
+ // This element manages its own visibility.
+ void SetEnabled(bool enabled) override;
private:
UiTexture* GetTexture() const override;
std::unique_ptr<UiTexture> texture_;
+ TransienceManager transience_;
DISALLOW_COPY_AND_ASSIGN(PresentationToast);
};

Powered by Google App Engine
This is Rietveld 408576698