Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1441)

Unified Diff: chrome/browser/android/vr_shell/ui_elements/content_backplane.h

Issue 2921383002: [vr] Close exit prompt when clicking on background (Closed)
Patch Set: fix diff Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/ui_elements/content_backplane.h
diff --git a/chrome/browser/android/vr_shell/ui_elements/content_backplane.h b/chrome/browser/android/vr_shell/ui_elements/content_backplane.h
new file mode 100644
index 0000000000000000000000000000000000000000..c9f3c543eb26dd7680f33bbf32fb469d2539fb0b
--- /dev/null
+++ b/chrome/browser/android/vr_shell/ui_elements/content_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_CONTENT_BACKPLANE_H_
+#define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_CONTENT_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
+// reticle roughly planar with the content if near content.
+class ContentBackplane : public UiElement {
+ public:
+ ContentBackplane(const base::Callback<void()>& click_callback);
+ ~ContentBackplane() override;
+
+ void OnButtonUp(const gfx::PointF& position) override;
+
+ private:
+ base::Callback<void()> click_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(ContentBackplane);
+};
+
+} // namespace vr_shell
+
+#endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_CONTENT_BACKPLANE_H_

Powered by Google App Engine
This is Rietveld 408576698