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

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

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_scene.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene.cc b/chrome/browser/android/vr_shell/ui_scene.cc
index 52e3684fc81ae548040b4ae998be3f0afca9bc13..2a9f3c7847297121db553f0fd5e43c2fbccea049 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,17 @@ UiElement* UiScene::GetUiElementById(int element_id) {
return nullptr;
}
+UiElement* UiScene::GetUiElementByIdentifier(
Ian Vollick 2017/05/19 14:42:32 nit/bikeshed: Id and Identifier are pretty close.
cjgrant 2017/05/19 15:10:40 Sure. I'll adapt that when we close on the NDEBUG
+ UiElementIdentifier identifier) const {
+ DCHECK(identifier != UiElementIdentifier::kNone);
+ for (const auto& element : ui_elements_) {
+ if (element->identifier() == identifier) {
+ return element.get();
+ }
+ }
+ return nullptr;
+}
+
std::vector<const UiElement*> UiScene::GetWorldElements() const {
std::vector<const UiElement*> elements;
for (const auto& element : ui_elements_) {

Powered by Google App Engine
This is Rietveld 408576698