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

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

Issue 2911943002: [vr] Add incognito coloring (Closed)
Patch Set: 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.h » ('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 39fd3aa241427d0e34e18143195756695be34273..95510d065ceaf252c587adbfb767042ccb718a75 100644
--- a/chrome/browser/android/vr_shell/ui_scene.cc
+++ b/chrome/browser/android/vr_shell/ui_scene.cc
@@ -175,12 +175,21 @@ bool UiScene::HasVisibleHeadLockedElements() const {
return !GetHeadLockedElements().empty();
}
-void UiScene::SetBackgroundColor(const SkColor& color) {
- background_color_ = color;
+void UiScene::SetMode(ColorScheme::Mode mode) {
+ if (mode == mode_)
+ return;
+
+ mode_ = mode;
+ for (const auto& element : ui_elements_)
+ element->SetMode(mode);
+}
+
+ColorScheme::Mode UiScene::mode() const {
+ return mode_;
}
-const SkColor& UiScene::GetBackgroundColor() const {
- return background_color_;
+SkColor UiScene::GetBackgroundColor() const {
+ return ColorScheme::GetColorScheme(mode_).horizon;
}
void UiScene::SetBackgroundDistance(float distance) {
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene.h ('k') | chrome/browser/android/vr_shell/ui_scene_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698