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