| 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 8824338a7afc01f86955fe5e69e7c1dc7ee2b56a..a85fd877b54dc567a315c4226b8db79f0b301766 100644
|
| --- a/chrome/browser/android/vr_shell/ui_scene.cc
|
| +++ b/chrome/browser/android/vr_shell/ui_scene.cc
|
| @@ -16,6 +16,17 @@ namespace vr_shell {
|
|
|
| namespace {
|
|
|
| +bool ParseFloat(const base::DictionaryValue& dict,
|
| + const std::string& key,
|
| + float* output) {
|
| + double value;
|
| + if (!dict.GetDouble(key, &value)) {
|
| + return false;
|
| + }
|
| + *output = value;
|
| + return true;
|
| +}
|
| +
|
| bool ParseRecti(const base::DictionaryValue& dict,
|
| const std::string& key,
|
| Recti* output) {
|
| @@ -323,6 +334,7 @@ void UiScene::RemoveAnimation(int element_id, int animation_id) {
|
|
|
| void UiScene::UpdateBackgroundFromDict(const base::DictionaryValue& dict) {
|
| ParseColorf(dict, "color", &background_color_);
|
| + ParseFloat(dict, "distance", &background_distance_);
|
| }
|
|
|
| void UiScene::HandleCommands(std::unique_ptr<base::ListValue> commands,
|
| @@ -390,14 +402,14 @@ ContentRectangle* UiScene::GetUiElementById(int element_id) {
|
| return nullptr;
|
| }
|
|
|
| -ContentRectangle* UiScene::GetContentQuad() {
|
| - return content_element_;
|
| -}
|
| -
|
| const Colorf& UiScene::GetBackgroundColor() {
|
| return background_color_;
|
| }
|
|
|
| +float UiScene::GetBackgroundDistance() {
|
| + return background_distance_;
|
| +}
|
| +
|
| const std::vector<std::unique_ptr<ContentRectangle>>&
|
| UiScene::GetUiElements() const {
|
| return ui_elements_;
|
|
|