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

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

Issue 2888283005: VR: Fix HTTP warning staying visible after exiting WebVR. (Closed)
Patch Set: Remove CCT TODO and add a test for it; fix EXPECTs on booleans; cleanup. 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/ui_element.h
diff --git a/chrome/browser/android/vr_shell/ui_elements/ui_element.h b/chrome/browser/android/vr_shell/ui_elements/ui_element.h
index 2d7aee23377b1f035dbd0dfe55cde61e221b2c05..85246fd2d92c57d12777eedf921c1e4a7cc6ab57 100644
--- a/chrome/browser/android/vr_shell/ui_elements/ui_element.h
+++ b/chrome/browser/android/vr_shell/ui_elements/ui_element.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/macros.h"
+#include "chrome/browser/android/vr_shell/ui_elements/ui_element_identifiers.h"
#include "device/vr/vr_types.h"
namespace base {
@@ -231,6 +232,12 @@ class UiElement : public WorldRectangle {
bool dirty() const { return dirty_; }
void set_dirty(bool dirty) { dirty_ = dirty; }
+ // A flag usable during transformation calculates to avoid duplicate work.
+ UiElementIdentifier identifier() const { return identifier_; }
+ void set_identifier(UiElementIdentifier identifier) {
+ identifier_ = identifier;
+ }
+
// By default, sets an element to be visible or not. This may be overridden to
// allow finer control of element visibility.
virtual void SetEnabled(bool enabled);
@@ -244,7 +251,7 @@ class UiElement : public WorldRectangle {
int parent_id_ = -1;
// If true, this object will be visible.
- bool visible_ = true;
+ bool visible_ = false;
// If false, the reticle will not hit the element, even if visible.
bool hit_testable_ = true;
@@ -299,6 +306,9 @@ class UiElement : public WorldRectangle {
// A flag usable during transformation calculates to avoid duplicate work.
bool dirty_ = false;
+ // An identifier used for testing and debugging, in lieu of a string.
+ UiElementIdentifier identifier_ = UiElementIdentifier::kNone;
Ian Vollick 2017/05/19 14:42:32 If it's for debugging, could we wrap with #ifndef
cjgrant 2017/05/19 15:10:40 We originally wanted to use strings for this, but
+
Transform transform_;
DISALLOW_COPY_AND_ASSIGN(UiElement);

Powered by Google App Engine
This is Rietveld 408576698