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

Unified Diff: chrome/browser/android/vr_shell/ui_elements/transient_url_bar.cc

Issue 2955023002: VR: Factor transient timing out of UiSceneManager. (Closed)
Patch Set: Rebase again onto ExclusivePresentationToast class/file rename. 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/transient_url_bar.cc
diff --git a/chrome/browser/android/vr_shell/ui_elements/transient_url_bar.cc b/chrome/browser/android/vr_shell/ui_elements/transient_url_bar.cc
index b6a88190297b1b4646147beedc43616867f3d55b..ad4c4e5c123432437b74771eb570d3a84e389e5a 100644
--- a/chrome/browser/android/vr_shell/ui_elements/transient_url_bar.cc
+++ b/chrome/browser/android/vr_shell/ui_elements/transient_url_bar.cc
@@ -11,9 +11,11 @@ namespace vr_shell {
TransientUrlBar::TransientUrlBar(
int preferred_width,
+ const base::TimeDelta& timeout,
const base::Callback<void(UiUnsupportedMode)>& failure_callback)
: TexturedElement(preferred_width),
- texture_(base::MakeUnique<UrlBarTexture>(true, failure_callback)) {}
+ texture_(base::MakeUnique<UrlBarTexture>(true, failure_callback)),
+ transience_(this, timeout) {}
TransientUrlBar::~TransientUrlBar() = default;
@@ -21,6 +23,10 @@ UiTexture* TransientUrlBar::GetTexture() const {
return texture_.get();
}
+void TransientUrlBar::SetEnabled(bool enabled) {
+ transience_.SetEnabled(enabled);
+}
+
void TransientUrlBar::SetToolbarState(const ToolbarState& state) {
texture_->SetToolbarState(state);
}
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/transient_url_bar.h ('k') | chrome/browser/android/vr_shell/ui_scene_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698