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

Unified Diff: chrome/browser/android/vr_shell/ui_scene.cc

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
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene.h ('k') | chrome/browser/android/vr_shell/ui_scene_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/ui_scene.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene.cc b/chrome/browser/android/vr_shell/ui_scene.cc
index 52e3684fc81ae548040b4ae998be3f0afca9bc13..d470fed1b14635bb9cc8a57b6154150102d583fe 100644
--- a/chrome/browser/android/vr_shell/ui_scene.cc
+++ b/chrome/browser/android/vr_shell/ui_scene.cc
@@ -121,7 +121,7 @@ void UiScene::OnBeginFrame(const base::TimeTicks& current_time) {
}
}
-UiElement* UiScene::GetUiElementById(int element_id) {
+UiElement* UiScene::GetUiElementById(int element_id) const {
for (const auto& element : ui_elements_) {
if (element->id() == element_id) {
return element.get();
@@ -130,6 +130,16 @@ UiElement* UiScene::GetUiElementById(int element_id) {
return nullptr;
}
+UiElement* UiScene::GetUiElementByDebugId(UiElementDebugId debug_id) const {
+ DCHECK(debug_id != UiElementDebugId::kNone);
+ for (const auto& element : ui_elements_) {
+ if (element->debug_id() == debug_id) {
+ return element.get();
+ }
+ }
+ return nullptr;
+}
+
std::vector<const UiElement*> UiScene::GetWorldElements() const {
std::vector<const UiElement*> elements;
for (const auto& element : ui_elements_) {
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene.h ('k') | chrome/browser/android/vr_shell/ui_scene_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698