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

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

Issue 2784303002: Adds button to VRShell menu mode, which lets the user manually exit WebVR presentation. (Closed)
Patch Set: Fixed closure compiler error Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/vr_shell.h" 5 #include "chrome/browser/android/vr_shell/vr_shell.h"
6 6
7 #include <android/native_window_jni.h> 7 #include <android/native_window_jni.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 case ZOOM_IN: // Not handled yet. 483 case ZOOM_IN: // Not handled yet.
484 return; 484 return;
485 case KEY_EVENT: { 485 case KEY_EVENT: {
486 int char_value; 486 int char_value;
487 int modifiers = 0; 487 int modifiers = 0;
488 arguments->GetInteger("modifiers", &modifiers); 488 arguments->GetInteger("modifiers", &modifiers);
489 CHECK(arguments->GetInteger("charValue", &char_value)); 489 CHECK(arguments->GetInteger("charValue", &char_value));
490 ui_input_manager_->GenerateKeyboardEvent(char_value, modifiers); 490 ui_input_manager_->GenerateKeyboardEvent(char_value, modifiers);
491 return; 491 return;
492 } 492 }
493 case EXIT_PRESENT:
494 delegate_provider_->ExitWebVRPresent();
495 return;
493 #if defined(ENABLE_VR_SHELL_UI_DEV) 496 #if defined(ENABLE_VR_SHELL_UI_DEV)
494 case RELOAD_UI: 497 case RELOAD_UI:
495 ui_contents_->GetController().Reload(content::ReloadType::NORMAL, false); 498 ui_contents_->GetController().Reload(content::ReloadType::NORMAL, false);
496 html_interface_.reset(new UiInterface(UiInterface::Mode::STANDARD)); 499 html_interface_.reset(new UiInterface(UiInterface::Mode::STANDARD));
497 SetUiState(); 500 SetUiState();
498 vr_web_contents_observer_->SetUiInterface(html_interface_.get()); 501 vr_web_contents_observer_->SetUiInterface(html_interface_.get());
499 return; 502 return;
500 #endif 503 #endif
501 default: 504 default:
502 break; 505 break;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 jboolean reprojected_rendering) { 782 jboolean reprojected_rendering) {
780 return reinterpret_cast<intptr_t>(new VrShell( 783 return reinterpret_cast<intptr_t>(new VrShell(
781 env, obj, reinterpret_cast<ui::WindowAndroid*>(content_window_android), 784 env, obj, reinterpret_cast<ui::WindowAndroid*>(content_window_android),
782 content::WebContents::FromJavaWebContents(ui_web_contents), 785 content::WebContents::FromJavaWebContents(ui_web_contents),
783 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), for_web_vr, 786 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), for_web_vr,
784 VrShellDelegate::GetNativeVrShellDelegate(env, delegate), 787 VrShellDelegate::GetNativeVrShellDelegate(env, delegate),
785 reinterpret_cast<gvr_context*>(gvr_api), reprojected_rendering)); 788 reinterpret_cast<gvr_context*>(gvr_api), reprojected_rendering));
786 } 789 }
787 790
788 } // namespace vr_shell 791 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.h ('k') | chrome/browser/android/vr_shell/vr_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698