| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/android/vr_shell/ui_scene_manager.h" | 5 #include "chrome/browser/android/vr_shell/ui_scene_manager.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "chrome/browser/android/vr_shell/color_scheme.h" | 9 #include "chrome/browser/android/vr_shell/color_scheme.h" |
| 10 #include "chrome/browser/android/vr_shell/textures/close_button_texture.h" | 10 #include "chrome/browser/android/vr_shell/textures/close_button_texture.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 -kBackgroundDistanceMultiplier); | 357 -kBackgroundDistanceMultiplier); |
| 358 } | 358 } |
| 359 | 359 |
| 360 void UiSceneManager::UpdateBackgroundColor() { | 360 void UiSceneManager::UpdateBackgroundColor() { |
| 361 scene_->SetBackgroundColor(color_scheme().horizon); | 361 scene_->SetBackgroundColor(color_scheme().horizon); |
| 362 ceiling_->set_center_color(color_scheme().ceiling); | 362 ceiling_->set_center_color(color_scheme().ceiling); |
| 363 ceiling_->set_edge_color(color_scheme().horizon); | 363 ceiling_->set_edge_color(color_scheme().horizon); |
| 364 floor_->set_center_color(color_scheme().floor); | 364 floor_->set_center_color(color_scheme().floor); |
| 365 floor_->set_edge_color(color_scheme().horizon); | 365 floor_->set_edge_color(color_scheme().horizon); |
| 366 floor_grid_->set_center_color(color_scheme().floor_grid); | 366 floor_grid_->set_center_color(color_scheme().floor_grid); |
| 367 vr::Colorf floor_grid_edge_color = color_scheme().floor_grid; | 367 SkColor floor_grid_edge_color = SkColorSetA(color_scheme().floor_grid, 0); |
| 368 floor_grid_edge_color.a = 0.0; | |
| 369 floor_grid_->set_edge_color(floor_grid_edge_color); | 368 floor_grid_->set_edge_color(floor_grid_edge_color); |
| 370 } | 369 } |
| 371 | 370 |
| 372 void UiSceneManager::SetAudioCapturingIndicator(bool enabled) { | 371 void UiSceneManager::SetAudioCapturingIndicator(bool enabled) { |
| 373 audio_capturing_ = enabled; | 372 audio_capturing_ = enabled; |
| 374 audio_capture_indicator_->set_visible(enabled && !web_vr_mode_); | 373 audio_capture_indicator_->set_visible(enabled && !web_vr_mode_); |
| 375 } | 374 } |
| 376 | 375 |
| 377 void UiSceneManager::SetVideoCapturingIndicator(bool enabled) { | 376 void UiSceneManager::SetVideoCapturingIndicator(bool enabled) { |
| 378 video_capturing_ = enabled; | 377 video_capturing_ = enabled; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 int UiSceneManager::AllocateId() { | 458 int UiSceneManager::AllocateId() { |
| 460 return next_available_id_++; | 459 return next_available_id_++; |
| 461 } | 460 } |
| 462 | 461 |
| 463 const ColorScheme& UiSceneManager::color_scheme() const { | 462 const ColorScheme& UiSceneManager::color_scheme() const { |
| 464 return ColorScheme::GetColorScheme(fullscreen_ ? ColorScheme::kModeFullscreen | 463 return ColorScheme::GetColorScheme(fullscreen_ ? ColorScheme::kModeFullscreen |
| 465 : ColorScheme::kModeNormal); | 464 : ColorScheme::kModeNormal); |
| 466 } | 465 } |
| 467 | 466 |
| 468 } // namespace vr_shell | 467 } // namespace vr_shell |
| OLD | NEW |