| 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_URL_BAR_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_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 "components/security_state/core/security_state.h" | 15 #include "components/security_state/core/security_state.h" |
| 15 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 16 | 17 |
| 17 namespace vr_shell { | 18 namespace vr_shell { |
| 18 | 19 |
| 19 class UrlBarTexture; | 20 class UrlBarTexture; |
| 20 | 21 |
| 21 class UrlBar : public TexturedElement { | 22 class UrlBar : public TexturedElement { |
| 22 public: | 23 public: |
| 23 explicit UrlBar(int preferred_width); | 24 UrlBar(int preferred_width, |
| 25 const base::Callback<void(UiUnsupportedMode)>& failure_callback); |
| 24 ~UrlBar() override; | 26 ~UrlBar() override; |
| 25 | 27 |
| 26 void OnHoverEnter(const gfx::PointF& position) override; | 28 void OnHoverEnter(const gfx::PointF& position) override; |
| 27 void OnHoverLeave() override; | 29 void OnHoverLeave() override; |
| 28 void OnMove(const gfx::PointF& position) override; | 30 void OnMove(const gfx::PointF& position) override; |
| 29 void OnButtonDown(const gfx::PointF& position) override; | 31 void OnButtonDown(const gfx::PointF& position) override; |
| 30 void OnButtonUp(const gfx::PointF& position) override; | 32 void OnButtonUp(const gfx::PointF& position) override; |
| 31 bool HitTest(const gfx::PointF& point) const override; | 33 bool HitTest(const gfx::PointF& point) const override; |
| 32 | 34 |
| 33 void OnBeginFrame(const base::TimeTicks& begin_frame_time) override; | 35 void OnBeginFrame(const base::TimeTicks& begin_frame_time) override; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 48 bool down_ = false; | 50 bool down_ = false; |
| 49 base::TimeTicks last_begin_frame_time_; | 51 base::TimeTicks last_begin_frame_time_; |
| 50 base::TimeTicks last_update_time_; | 52 base::TimeTicks last_update_time_; |
| 51 | 53 |
| 52 DISALLOW_COPY_AND_ASSIGN(UrlBar); | 54 DISALLOW_COPY_AND_ASSIGN(UrlBar); |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 } // namespace vr_shell | 57 } // namespace vr_shell |
| 56 | 58 |
| 57 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_ | 59 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_URL_BAR_H_ |
| OLD | NEW |