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_VR_ELEMENTS_INVISIBLE_HIT_TARGET_H_
6 #define CHROME_BROWSER_VR_ELEMENTS_INVISIBLE_HIT_TARGET_H_
7 
8 #include "base/macros.h"
9 #include "chrome/browser/vr/elements/ui_element.h"
10 
11 namespace vr {
12 
13 // A hit target does not render, but may affect reticle positioning.
14 class InvisibleHitTarget : public UiElement {
15  public:
16   InvisibleHitTarget();
17   ~InvisibleHitTarget() override;
18 
19   void Render(UiElementRenderer* renderer,
20               const CameraModel& model) const final;
21 
22   void OnHoverEnter(const gfx::PointF& position,
23                     base::TimeTicks timestamp) override;
24   void OnHoverLeave(base::TimeTicks timestamp) override;
25 
hovered()26   bool hovered() const { return hovered_; }
27 
28  private:
29   DISALLOW_COPY_AND_ASSIGN(InvisibleHitTarget);
30   bool hovered_ = false;
31 };
32 
33 }  // namespace vr
34 
35 #endif  // CHROME_BROWSER_VR_ELEMENTS_INVISIBLE_HIT_TARGET_H_
36