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/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" | 8 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" |
| 9 #include "chrome/browser/android/vr_shell/ui_elements/permanent_security_warning .h" | 9 #include "chrome/browser/android/vr_shell/ui_elements/permanent_security_warning .h" |
| 10 #include "chrome/browser/android/vr_shell/ui_elements/transient_security_warning .h" | 10 #include "chrome/browser/android/vr_shell/ui_elements/transient_security_warning .h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 secure_origin_ = secure; | 218 secure_origin_ = secure; |
| 219 ConfigureSecurityWarnings(); | 219 ConfigureSecurityWarnings(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void UiSceneManager::OnAppButtonClicked() { | 222 void UiSceneManager::OnAppButtonClicked() { |
| 223 // Pressing the app button currenly pauses content rendering. Note: its still | 223 // Pressing the app button currenly pauses content rendering. Note: its still |
| 224 // unclear what we want to do here and this will most likely change. | 224 // unclear what we want to do here and this will most likely change. |
| 225 content_rendering_enabled_ = !content_rendering_enabled_; | 225 content_rendering_enabled_ = !content_rendering_enabled_; |
| 226 scene_->SetWebVrRenderingEnabled(content_rendering_enabled_); | 226 scene_->SetWebVrRenderingEnabled(content_rendering_enabled_); |
| 227 browser_->OnContentPaused(!content_rendering_enabled_); | 227 browser_->OnContentPaused(!content_rendering_enabled_); |
| 228 browser_->ExitFullscreen(); | |
|
tiborg
2017/05/10 15:18:50
What happens if you exit fullscreen on a presentin
amp
2017/05/10 15:40:08
It will check if the web contents are fullscreened
tiborg
2017/05/10 15:48:43
I thought WebVR presentation includes being in ful
amp
2017/05/10 16:15:01
I just verified with this patch (your comment was
tiborg
2017/05/10 17:01:44
No, this confirmed this reasonable well. FYI, crre
| |
| 228 } | 229 } |
| 229 | 230 |
| 230 void UiSceneManager::OnAppButtonGesturePerformed( | 231 void UiSceneManager::OnAppButtonGesturePerformed( |
| 231 UiInterface::Direction direction) {} | 232 UiInterface::Direction direction) {} |
| 232 | 233 |
| 233 void UiSceneManager::SetFullscreen(bool fullscreen) { | 234 void UiSceneManager::SetFullscreen(bool fullscreen) { |
| 234 // Make all VR scene UI elements visible if not in WebVR or fullscreen. | 235 // Make all VR scene UI elements visible if not in WebVR or fullscreen. |
| 235 for (UiElement* element : browser_ui_elements_) { | 236 for (UiElement* element : browser_ui_elements_) { |
| 236 element->set_visible(!fullscreen); | 237 element->set_visible(!fullscreen); |
| 237 } | 238 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 void UiSceneManager::SetLoadProgress(double progress) {} | 286 void UiSceneManager::SetLoadProgress(double progress) {} |
| 286 | 287 |
| 287 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back, | 288 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back, |
| 288 bool can_go_forward) {} | 289 bool can_go_forward) {} |
| 289 | 290 |
| 290 int UiSceneManager::AllocateId() { | 291 int UiSceneManager::AllocateId() { |
| 291 return next_available_id_++; | 292 return next_available_id_++; |
| 292 } | 293 } |
| 293 | 294 |
| 294 } // namespace vr_shell | 295 } // namespace vr_shell |
| OLD | NEW |