| Index: chrome/browser/android/vr_shell/ui_elements/simple_textured_element.h
|
| diff --git a/chrome/browser/android/vr_shell/ui_elements/simple_textured_element.h b/chrome/browser/android/vr_shell/ui_elements/simple_textured_element.h
|
| index 2b42a2e611182e9f3fc35cff1d0742cf02f1e669..d0957e1f1486b2db2522f7c0165af0d084c4ab86 100644
|
| --- a/chrome/browser/android/vr_shell/ui_elements/simple_textured_element.h
|
| +++ b/chrome/browser/android/vr_shell/ui_elements/simple_textured_element.h
|
| @@ -16,6 +16,7 @@
|
| #include "chrome/browser/android/vr_shell/textures/splash_screen_icon_texture.h"
|
| #include "chrome/browser/android/vr_shell/textures/ui_texture.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 {
|
|
|
| @@ -39,10 +40,29 @@ class SimpleTexturedElement : public TexturedElement {
|
| DISALLOW_COPY_AND_ASSIGN(SimpleTexturedElement);
|
| };
|
|
|
| +template <class T>
|
| +class TransientSimpleTexturedElement : public SimpleTexturedElement<T> {
|
| + public:
|
| + TransientSimpleTexturedElement(int maximum_width,
|
| + const base::TimeDelta& timeout)
|
| + : SimpleTexturedElement<T>(maximum_width), transience_(this, timeout) {}
|
| +
|
| + ~TransientSimpleTexturedElement() override {}
|
| +
|
| + void SetEnabled(bool enabled) override { transience_.SetEnabled(enabled); }
|
| +
|
| + TransienceManager* transience() { return &transience_; }
|
| +
|
| + private:
|
| + TransienceManager transience_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TransientSimpleTexturedElement);
|
| +};
|
| +
|
| typedef SimpleTexturedElement<ExitWarningTexture> ExitWarning;
|
| typedef SimpleTexturedElement<InsecureContentPermanentTexture>
|
| PermanentSecurityWarning;
|
| -typedef SimpleTexturedElement<InsecureContentTransientTexture>
|
| +typedef TransientSimpleTexturedElement<InsecureContentTransientTexture>
|
| TransientSecurityWarning;
|
| typedef SimpleTexturedElement<SplashScreenIconTexture> SplashScreenIcon;
|
|
|
|
|