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

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements/ui_element.h

Issue 2840183003: VR: Route hover and click events to UI elements. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_UI_ELEMENT_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 bool IsVisible() const; 97 bool IsVisible() const;
98 98
99 // Indicates whether the element should be tested for cursor input. 99 // Indicates whether the element should be tested for cursor input.
100 bool IsHitTestable() const; 100 bool IsHitTestable() const;
101 101
102 virtual void Render(VrShellRenderer* renderer, 102 virtual void Render(VrShellRenderer* renderer,
103 vr::Mat4f view_proj_matrix) const; 103 vr::Mat4f view_proj_matrix) const;
104 104
105 virtual void Initialize(); 105 virtual void Initialize();
106 106
107 // Controller interaction methods.
108 virtual void OnMouseEnter();
cjgrant 2017/04/26 14:36:16 I used Mouse by convention, but these could be OnH
mthiesse 2017/04/26 16:09:49 Hover enter/leave sound better to me.
109 virtual void OnMouseLeave();
110 virtual void OnClick();
111
107 // Valid IDs are non-negative. 112 // Valid IDs are non-negative.
108 int id = -1; 113 int id = -1;
109 114
110 // Name string for debugging and testing purposes. 115 // Name string for debugging and testing purposes.
111 std::string name; 116 std::string name;
112 117
113 // If a non-negative parent ID is specified, applicable transformations 118 // If a non-negative parent ID is specified, applicable transformations
114 // are applied relative to the parent, rather than absolutely. 119 // are applied relative to the parent, rather than absolutely.
115 int parent_id = -1; 120 int parent_id = -1;
116 121
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // A flag usable during transformation calculates to avoid duplicate work. 175 // A flag usable during transformation calculates to avoid duplicate work.
171 bool dirty; 176 bool dirty;
172 177
173 private: 178 private:
174 DISALLOW_COPY_AND_ASSIGN(UiElement); 179 DISALLOW_COPY_AND_ASSIGN(UiElement);
175 }; 180 };
176 181
177 } // namespace vr_shell 182 } // namespace vr_shell
178 183
179 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ 184 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698