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

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: Rename to debug_id_ and UiElementDebugId 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..96cc0054fde674d605929b7b97541bab55f2963b 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_debug_id.h"
#include "device/vr/vr_types.h"
namespace base {
@@ -231,6 +232,10 @@ 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.
+ UiElementDebugId debug_id() const { return debug_id_; }
+ void set_debug_id(UiElementDebugId debug_id) { debug_id_ = debug_id; }
+
// 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 +249,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 +304,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.
+ UiElementDebugId debug_id_ = UiElementDebugId::kNone;
+
Transform transform_;
DISALLOW_COPY_AND_ASSIGN(UiElement);
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/ui_elements/ui_element_debug_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698