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

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements/transience_manager.h

Issue 2955023002: VR: Factor transient timing out of UiSceneManager. (Closed)
Patch Set: Rebase again onto ExclusivePresentationToast class/file rename. Created 3 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENCE_MANAGER_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENCE_MANAGER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/timer/timer.h"
12 #include "chrome/browser/android/vr_shell/ui_elements/ui_element.h"
13
14 namespace vr_shell {
15
16 class TransienceManager {
17 public:
18 TransienceManager(UiElement* element, const base::TimeDelta& timeout);
19 virtual ~TransienceManager() = default;
20
21 void SetEnabled(bool enabled);
22 void KickVisibilityIfEnabled();
23 void EndVisibilityIfEnabled();
24
25 private:
26 void StartTimer();
27 void OnTimeout();
28
29 UiElement* element_;
30 base::TimeDelta timeout_;
31 bool enabled_ = false;
32 base::OneShotTimer visibility_timer_;
33 };
34
35 } // namespace vr_shell
36
37 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENCE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698