Chromium Code Reviews| Index: chrome/browser/android/vr_shell/ui_elements/exit_prompt_backplane.h |
| diff --git a/chrome/browser/android/vr_shell/ui_elements/exit_prompt_backplane.h b/chrome/browser/android/vr_shell/ui_elements/exit_prompt_backplane.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2b04ecc312468a6f7d26776023249dba06e33d1a |
| --- /dev/null |
| +++ b/chrome/browser/android/vr_shell/ui_elements/exit_prompt_backplane.h |
| @@ -0,0 +1,30 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_BACKPLANE_H_ |
| +#define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_BACKPLANE_H_ |
| + |
| +#include "base/callback.h" |
| +#include "chrome/browser/android/vr_shell/ui_elements/ui_element.h" |
| + |
| +namespace vr_shell { |
| + |
| +// An invisible but hittable plane behind the content quad, to keep the |
|
cjgrant
2017/06/06 21:21:55
"behind the exit prompt" (and again later in the
ymalik
2017/06/07 14:55:58
Done.
|
| +// reticle roughly planar with the content if near content. |
| +class ExitPromptBackplane : public UiElement { |
| + public: |
| + explicit ExitPromptBackplane(const base::Callback<void()>& click_callback); |
| + ~ExitPromptBackplane() override; |
| + |
| + void OnButtonUp(const gfx::PointF& position) override; |
| + |
| + private: |
| + base::Callback<void()> click_callback_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ExitPromptBackplane); |
| +}; |
| + |
| +} // namespace vr_shell |
| + |
| +#endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_EXIT_PROMPT_BACKPLANE_H_ |