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

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

Issue 2773903003: Add way to get native VR UI information from Java (Closed)
Patch Set: Remove comment Created 3 years, 9 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.h
diff --git a/chrome/browser/android/vr_shell/ui_scene.h b/chrome/browser/android/vr_shell/ui_scene.h
index 4bcb6d88d29a490db659f71ee6a5720adfad48f4..d57e851b0c7d49743594d627ad0fef2fb3ed6479 100644
--- a/chrome/browser/android/vr_shell/ui_scene.h
+++ b/chrome/browser/android/vr_shell/ui_scene.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
#include <memory>
+#include <string>
#include <vector>
#include "base/macros.h"
@@ -67,6 +68,7 @@ class UiScene {
const std::vector<std::unique_ptr<ContentRectangle>>& GetUiElements() const;
ContentRectangle* GetUiElementById(int element_id);
+ ContentRectangle* GetUiElementByName(const std::string& element_name);
std::vector<const ContentRectangle*> GetWorldElements() const;
std::vector<const ContentRectangle*> GetHeadLockedElements() const;
@@ -76,6 +78,12 @@ class UiScene {
float GetBackgroundDistance() const;
bool GetWebVrRenderingEnabled() const;
+ // Builds a dictionary of the given element's properties for testing
+ // purposes. This dictionary can be serialized and passed back to Java
+ // during end-to-end testing.
+ std::unique_ptr<base::DictionaryValue> CreateUiElementInfo(
+ const std::string& element_name);
+
private:
void ApplyRecursiveTransforms(ContentRectangle* element);
void ApplyDictToElement(const base::DictionaryValue& dict,

Powered by Google App Engine
This is Rietveld 408576698