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

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

Issue 2878083003: VR Shell: Allow UI elements to determine hit testing. (Closed)
Patch Set: rebase Created 3 years, 7 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/close_button.h
diff --git a/chrome/browser/android/vr_shell/ui_elements/close_button.h b/chrome/browser/android/vr_shell/ui_elements/close_button.h
index 682364d8d89bfcf7025bc38578fe325435f02c99..45ed4a01189a80bf7f52fd74fccd59b94489090a 100644
--- a/chrome/browser/android/vr_shell/ui_elements/close_button.h
+++ b/chrome/browser/android/vr_shell/ui_elements/close_button.h
@@ -23,16 +23,17 @@ class CloseButton : public TexturedElement {
void OnHoverLeave() override;
void OnHoverEnter(gfx::PointF position) override;
+ void OnMove(gfx::PointF position) override;
void OnButtonDown(gfx::PointF position) override;
void OnButtonUp(gfx::PointF position) override;
+ bool HitTest(gfx::PointF point) const override;
cjgrant 2017/05/15 16:55:09 How are we going to handle elements that have two
mthiesse 2017/05/15 21:11:27 Don't like it, and also "not in this CL". An eleme
private:
UiTexture* GetTexture() const override;
- void OnStateUpdated();
+ void OnStateUpdated(gfx::PointF position);
std::unique_ptr<CloseButtonTexture> texture_;
bool down_ = false;
- bool hover_ = false;
base::Callback<void()> click_handler_;
DISALLOW_COPY_AND_ASSIGN(CloseButton);

Powered by Google App Engine
This is Rietveld 408576698