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

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

Issue 2966793002: NOT FOR REVIEW - convert to cc animation
Patch Set: switch to transform operations 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_elements/transience_manager.h"
15 #include "chrome/browser/android/vr_shell/ui_unsupported_mode.h" 15 #include "chrome/browser/android/vr_shell/ui_unsupported_mode.h"
16 #include "components/security_state/core/security_state.h" 16 #include "components/security_state/core/security_state.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 namespace vr_shell { 19 namespace vr_shell {
20 20
21 class UrlBarTexture; 21 class UrlBarTexture;
22 struct ToolbarState; 22 struct ToolbarState;
23 23
24 // 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
25 // autopresented. 25 // autopresented.
26 class TransientUrlBar : public TexturedElement { 26 class TransientUrlBar : public TexturedElement {
27 public: 27 public:
28 TransientUrlBar( 28 TransientUrlBar(
29 int id,
29 int preferred_width, 30 int preferred_width,
30 const base::TimeDelta& timeout, 31 const base::TimeDelta& timeout,
31 const base::Callback<void(UiUnsupportedMode)>& failure_callback); 32 const base::Callback<void(UiUnsupportedMode)>& failure_callback);
32 ~TransientUrlBar() override; 33 ~TransientUrlBar() override;
33 34
34 void SetEnabled(bool enabled) override; 35 void SetEnabled(bool enabled) override;
35 36
36 void SetToolbarState(const ToolbarState& state); 37 void SetToolbarState(const ToolbarState& state);
37 38
38 private: 39 private:
39 UiTexture* GetTexture() const override; 40 UiTexture* GetTexture() const override;
40 41
41 std::unique_ptr<UrlBarTexture> texture_; 42 std::unique_ptr<UrlBarTexture> texture_;
42 TransienceManager transience_; 43 TransienceManager transience_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(TransientUrlBar); 45 DISALLOW_COPY_AND_ASSIGN(TransientUrlBar);
45 }; 46 };
46 47
47 } // namespace vr_shell 48 } // namespace vr_shell
48 49
49 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENT_URL_BAR_H_ 50 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENT_URL_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698