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

Side by Side Diff: chrome/browser/android/vr_shell/ui_scene_manager.cc

Issue 2874103003: Revert of App button click exits WebVR presentation. (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 unified diff | Download patch
OLDNEW
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 ConfigureSecurityWarnings(); 217 ConfigureSecurityWarnings();
218 } 218 }
219 219
220 void UiSceneManager::SetWebVrSecureOrigin(bool secure) { 220 void UiSceneManager::SetWebVrSecureOrigin(bool secure) {
221 secure_origin_ = secure; 221 secure_origin_ = secure;
222 ConfigureSecurityWarnings(); 222 ConfigureSecurityWarnings();
223 } 223 }
224 224
225 void UiSceneManager::OnAppButtonClicked() { 225 void UiSceneManager::OnAppButtonClicked() {
226 // App button click exits the WebVR presentation. 226 // Pressing the app button currenly pauses content rendering. Note: its still
227 browser_->ExitPresent(); 227 // unclear what we want to do here and this will most likely change.
228 content_rendering_enabled_ = !content_rendering_enabled_;
229 scene_->SetWebVrRenderingEnabled(content_rendering_enabled_);
230 browser_->OnContentPaused(!content_rendering_enabled_);
228 } 231 }
229 232
230 void UiSceneManager::OnAppButtonGesturePerformed( 233 void UiSceneManager::OnAppButtonGesturePerformed(
231 UiInterface::Direction direction) {} 234 UiInterface::Direction direction) {}
232 235
233 void UiSceneManager::SetFullscreen(bool fullscreen) { 236 void UiSceneManager::SetFullscreen(bool fullscreen) {
234 // Make all VR scene UI elements visible if not in WebVR or fullscreen. 237 // Make all VR scene UI elements visible if not in WebVR or fullscreen.
235 for (UiElement* element : browser_ui_elements_) { 238 for (UiElement* element : browser_ui_elements_) {
236 element->set_visible(!fullscreen); 239 element->set_visible(!fullscreen);
237 } 240 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 void UiSceneManager::SetLoadProgress(double progress) {} 294 void UiSceneManager::SetLoadProgress(double progress) {}
292 295
293 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back, 296 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back,
294 bool can_go_forward) {} 297 bool can_go_forward) {}
295 298
296 int UiSceneManager::AllocateId() { 299 int UiSceneManager::AllocateId() {
297 return next_available_id_++; 300 return next_available_id_++;
298 } 301 }
299 302
300 } // namespace vr_shell 303 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_manager.h ('k') | chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698