| OLD | NEW |
| 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_unsupported_mode.h" | 14 #include "chrome/browser/android/vr_shell/ui_unsupported_mode.h" |
| 15 #include "components/security_state/core/security_state.h" | 15 #include "components/security_state/core/security_state.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 namespace vr_shell { | 18 namespace vr_shell { |
| 19 | 19 |
| 20 class UrlBarTexture; | 20 class UrlBarTexture; |
| 21 struct ToolbarState; |
| 21 | 22 |
| 22 // The non-interactive URL bar that shows for some time when WebVR content is | 23 // The non-interactive URL bar that shows for some time when WebVR content is |
| 23 // autopresented. | 24 // autopresented. |
| 24 class TransientUrlBar : public TexturedElement { | 25 class TransientUrlBar : public TexturedElement { |
| 25 public: | 26 public: |
| 26 TransientUrlBar( | 27 TransientUrlBar( |
| 27 int preferred_width, | 28 int preferred_width, |
| 28 const base::Callback<void(UiUnsupportedMode)>& failure_callback); | 29 const base::Callback<void(UiUnsupportedMode)>& failure_callback); |
| 29 ~TransientUrlBar() override; | 30 ~TransientUrlBar() override; |
| 30 | 31 |
| 31 void SetURL(const GURL& gurl); | 32 void SetToolbarState(const ToolbarState& state); |
| 32 void SetSecurityInfo(security_state::SecurityLevel level, bool malware); | |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 UiTexture* GetTexture() const override; | 35 UiTexture* GetTexture() const override; |
| 36 | 36 |
| 37 std::unique_ptr<UrlBarTexture> texture_; | 37 std::unique_ptr<UrlBarTexture> texture_; |
| 38 | 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(TransientUrlBar); | 39 DISALLOW_COPY_AND_ASSIGN(TransientUrlBar); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace vr_shell | 42 } // namespace vr_shell |
| 43 | 43 |
| 44 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENT_URL_BAR_H_ | 44 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TRANSIENT_URL_BAR_H_ |
| OLD | NEW |