| 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_EXIT_PROMPT_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_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 "chrome/browser/android/vr_shell/ui_elements/textured_element.h" | 12 #include "chrome/browser/android/vr_shell/ui_elements/textured_element.h" |
| 13 | 13 |
| 14 namespace vr_shell { | 14 namespace vr_shell { |
| 15 | 15 |
| 16 class ExitPromptTexture; | 16 class ExitPromptTexture; |
| 17 | 17 |
| 18 class ExitPrompt : public TexturedElement { | 18 class ExitPrompt : public TexturedElement { |
| 19 public: | 19 public: |
| 20 ExitPrompt(int preferred_width, | 20 ExitPrompt(int id, |
| 21 int preferred_width, |
| 21 const base::Callback<void()>& primary_button_callback, | 22 const base::Callback<void()>& primary_button_callback, |
| 22 const base::Callback<void()>& secondary_buttton_callback); | 23 const base::Callback<void()>& secondary_buttton_callback); |
| 23 ~ExitPrompt() override; | 24 ~ExitPrompt() override; |
| 24 | 25 |
| 25 void SetTextureForTesting(ExitPromptTexture* texture); | 26 void SetTextureForTesting(ExitPromptTexture* texture); |
| 26 | 27 |
| 27 void OnHoverEnter(const gfx::PointF& position) override; | 28 void OnHoverEnter(const gfx::PointF& position) override; |
| 28 void OnHoverLeave() override; | 29 void OnHoverLeave() override; |
| 29 void OnMove(const gfx::PointF& position) override; | 30 void OnMove(const gfx::PointF& position) override; |
| 30 void OnButtonDown(const gfx::PointF& position) override; | 31 void OnButtonDown(const gfx::PointF& position) override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 42 | 43 |
| 43 base::Callback<void()> primary_button_callback_; | 44 base::Callback<void()> primary_button_callback_; |
| 44 base::Callback<void()> secondary_buttton_callback_; | 45 base::Callback<void()> secondary_buttton_callback_; |
| 45 | 46 |
| 46 DISALLOW_COPY_AND_ASSIGN(ExitPrompt); | 47 DISALLOW_COPY_AND_ASSIGN(ExitPrompt); |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 } // namespace vr_shell | 50 } // namespace vr_shell |
| 50 | 51 |
| 51 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_H_ | 52 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_H_ |
| OLD | NEW |