Chromium Code Reviews| 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/textures/ui_texture.h" | 9 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" |
| 10 #include "chrome/browser/android/vr_shell/ui_elements/audio_capture_indicator.h" | 10 #include "chrome/browser/android/vr_shell/ui_elements/audio_capture_indicator.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 // Note that main_content_ is already visible in this case. | 281 // Note that main_content_ is already visible in this case. |
| 282 main_content_->set_translation( | 282 main_content_->set_translation( |
| 283 {0, kContentVerticalOffset, -kContentDistance}); | 283 {0, kContentVerticalOffset, -kContentDistance}); |
| 284 main_content_->set_size({kContentWidth, kContentHeight, 1}); | 284 main_content_->set_size({kContentWidth, kContentHeight, 1}); |
| 285 } | 285 } |
| 286 | 286 |
| 287 scene_->SetBackgroundDistance(main_content_->translation().z() * | 287 scene_->SetBackgroundDistance(main_content_->translation().z() * |
| 288 -kBackgroundDistanceMultiplier); | 288 -kBackgroundDistanceMultiplier); |
| 289 } | 289 } |
| 290 | 290 |
| 291 void UiSceneManager::SetAudioCapturingIndicator(bool is_capturing) { | |
| 292 audio_input_indicator_->set_visible(is_capturing); | |
|
cjgrant
2017/05/16 19:09:27
Should these members be called audio_capture_indic
acondor_
2017/05/16 19:11:40
yes, my bad.
asimjour1
2017/05/16 20:13:55
Done.
| |
| 293 } | |
| 294 | |
| 295 void UiSceneManager::SetVideoCapturingIndicator(bool is_capturing) { | |
| 296 video_input_indicator_->set_visible(is_capturing); | |
| 297 } | |
| 298 | |
| 299 void UiSceneManager::SetScreenCapturingIndicator(bool is_capturing) { | |
| 300 // TODO(asimjour) add the indicator and change the visibility here. | |
| 301 } | |
| 302 | |
| 291 void UiSceneManager::SetWebVrSecureOrigin(bool secure) { | 303 void UiSceneManager::SetWebVrSecureOrigin(bool secure) { |
| 292 secure_origin_ = secure; | 304 secure_origin_ = secure; |
| 293 ConfigureSecurityWarnings(); | 305 ConfigureSecurityWarnings(); |
| 294 } | 306 } |
| 295 | 307 |
| 296 void UiSceneManager::OnAppButtonClicked() { | 308 void UiSceneManager::OnAppButtonClicked() { |
| 297 // App button click exits the WebVR presentation and fullscreen. | 309 // App button click exits the WebVR presentation and fullscreen. |
| 298 browser_->ExitPresent(); | 310 browser_->ExitPresent(); |
| 299 browser_->ExitFullscreen(); | 311 browser_->ExitFullscreen(); |
| 300 } | 312 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 349 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back, | 361 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back, |
| 350 bool can_go_forward) {} | 362 bool can_go_forward) {} |
| 351 | 363 |
| 352 void UiSceneManager::OnCloseButtonClicked() {} | 364 void UiSceneManager::OnCloseButtonClicked() {} |
| 353 | 365 |
| 354 int UiSceneManager::AllocateId() { | 366 int UiSceneManager::AllocateId() { |
| 355 return next_available_id_++; | 367 return next_available_id_++; |
| 356 } | 368 } |
| 357 | 369 |
| 358 } // namespace vr_shell | 370 } // namespace vr_shell |
| OLD | NEW |