| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "base/macros.h" |
| 12 #include "chrome/browser/android/vr_shell/ui_elements/textured_element.h" |
| 13 |
| 14 namespace vr_shell { |
| 15 |
| 16 class ExitPromptTexture; |
| 17 |
| 18 class ExitPrompt : public TexturedElement { |
| 19 public: |
| 20 ExitPrompt(int preferred_width, |
| 21 const base::Callback<void()>& primary_button_callback, |
| 22 const base::Callback<void()>& secondary_buttton_callback); |
| 23 ~ExitPrompt() override; |
| 24 |
| 25 void SetTextureForTesting(ExitPromptTexture* texture); |
| 26 |
| 27 void OnHoverEnter(const gfx::PointF& position) override; |
| 28 void OnHoverLeave() override; |
| 29 void OnMove(const gfx::PointF& position) override; |
| 30 void OnButtonDown(const gfx::PointF& position) override; |
| 31 void OnButtonUp(const gfx::PointF& position) override; |
| 32 |
| 33 private: |
| 34 UiTexture* GetTexture() const override; |
| 35 |
| 36 void OnStateUpdated(const gfx::PointF& position); |
| 37 |
| 38 bool primary_down_ = false; |
| 39 bool secondary_down_ = false; |
| 40 |
| 41 std::unique_ptr<ExitPromptTexture> texture_; |
| 42 |
| 43 base::Callback<void()> primary_button_callback_; |
| 44 base::Callback<void()> secondary_buttton_callback_; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(ExitPrompt); |
| 47 }; |
| 48 |
| 49 } // namespace vr_shell |
| 50 |
| 51 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_H_ |
| OLD | NEW |