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 f07076f8066683b9a7a4c5674883f99c8dbbea96..ed0eeaddfc2df024b5d0fabe681dc7e1862ba499 100644 |
--- a/chrome/browser/android/vr_shell/ui_scene.cc |
+++ b/chrome/browser/android/vr_shell/ui_scene.cc |
@@ -284,11 +284,6 @@ 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, |
int64_t time_in_micro) { |
for (auto& item : *commands) { |
@@ -323,8 +318,11 @@ void UiScene::HandleCommands(std::unique_ptr<base::ListValue> commands, |
RemoveAnimation(element_id, animation_id); |
break; |
} |
- case Command::UPDATE_BACKGROUND: |
- UpdateBackgroundFromDict(*data); |
+ case Command::CONFIGURE_SCENE: |
+ ParseColorf(*data, "backgroundColor", &background_color_); |
+ ParseFloat(*data, "backgroundDistance", &background_distance_); |
+ data->GetBoolean("drawCursor", &cursor_enabled_); |
+ data->GetBoolean("drawWebVr", &webvr_rendering_enabled_); |
cjgrant
2017/03/16 15:44:36
We could merge this with the action "pause content
tiborg
2017/03/16 19:40:22
+1 for merging.
cjgrant
2017/03/20 15:34:57
In the end, I merged the two rendering properties,
tiborg
2017/03/20 15:56:08
SGTM.
|
break; |
} |
} |
@@ -355,14 +353,22 @@ ContentRectangle* UiScene::GetUiElementById(int element_id) { |
return nullptr; |
} |
-const Colorf& UiScene::GetBackgroundColor() { |
+const Colorf& UiScene::GetBackgroundColor() const { |
tiborg
2017/03/16 19:40:22
+1 for const!
|
return background_color_; |
} |
-float UiScene::GetBackgroundDistance() { |
+float UiScene::GetBackgroundDistance() const { |
return background_distance_; |
} |
+bool UiScene::GetCursorEnabled() const { |
+ return cursor_enabled_; |
+} |
+ |
+bool UiScene::GetWebVrRenderingEnabled() const { |
+ return webvr_rendering_enabled_; |
+} |
+ |
const std::vector<std::unique_ptr<ContentRectangle>>& UiScene::GetUiElements() |
const { |
return ui_elements_; |