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

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements/transient_url_bar.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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENT_URL_BAR_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENT_URL_BAR_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENT_URL_BAR_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENT_URL_BAR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "chrome/browser/android/vr_shell/ui_elements/textured_element.h" 13 #include "chrome/browser/android/vr_shell/ui_elements/textured_element.h"
14 #include "chrome/browser/android/vr_shell/ui_elements/transience_manager.h"
14 #include "chrome/browser/android/vr_shell/ui_unsupported_mode.h" 15 #include "chrome/browser/android/vr_shell/ui_unsupported_mode.h"
15 #include "components/security_state/core/security_state.h" 16 #include "components/security_state/core/security_state.h"
16 #include "url/gurl.h" 17 #include "url/gurl.h"
17 18
18 namespace vr_shell { 19 namespace vr_shell {
19 20
20 class UrlBarTexture; 21 class UrlBarTexture;
21 struct ToolbarState; 22 struct ToolbarState;
22 23
23 // The non-interactive URL bar that shows for some time when WebVR content is 24 // The non-interactive URL bar that shows for some time when WebVR content is
24 // autopresented. 25 // autopresented.
25 class TransientUrlBar : public TexturedElement { 26 class TransientUrlBar : public TexturedElement {
26 public: 27 public:
27 TransientUrlBar( 28 TransientUrlBar(
28 int preferred_width, 29 int preferred_width,
30 const base::TimeDelta& timeout,
29 const base::Callback<void(UiUnsupportedMode)>& failure_callback); 31 const base::Callback<void(UiUnsupportedMode)>& failure_callback);
30 ~TransientUrlBar() override; 32 ~TransientUrlBar() override;
31 33
34 void SetEnabled(bool enabled) override;
35
32 void SetToolbarState(const ToolbarState& state); 36 void SetToolbarState(const ToolbarState& state);
33 37
34 private: 38 private:
35 UiTexture* GetTexture() const override; 39 UiTexture* GetTexture() const override;
36 40
37 std::unique_ptr<UrlBarTexture> texture_; 41 std::unique_ptr<UrlBarTexture> texture_;
42 TransienceManager transience_;
38 43
39 DISALLOW_COPY_AND_ASSIGN(TransientUrlBar); 44 DISALLOW_COPY_AND_ASSIGN(TransientUrlBar);
40 }; 45 };
41 46
42 } // namespace vr_shell 47 } // namespace vr_shell
43 48
44 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENT_URL_BAR_H_ 49 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENT_URL_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698