| OLD | NEW |
| 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 "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 #include "chrome/browser/android/vr_shell/ui_elements.h" | 8 #include "chrome/browser/android/vr_shell/ui_elements.h" |
| 9 #include "chrome/browser/android/vr_shell/ui_interface.h" | 9 #include "chrome/browser/android/vr_shell/ui_interface.h" |
| 10 #include "chrome/browser/android/vr_shell/ui_scene.h" | 10 #include "chrome/browser/android/vr_shell/ui_scene.h" |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 bool enabled) { | 975 bool enabled) { |
| 976 metrics_helper_->SetWebVREnabled(enabled); | 976 metrics_helper_->SetWebVREnabled(enabled); |
| 977 if (enabled) { | 977 if (enabled) { |
| 978 html_interface_->SetMode(UiInterface::Mode::WEB_VR); | 978 html_interface_->SetMode(UiInterface::Mode::WEB_VR); |
| 979 } else { | 979 } else { |
| 980 html_interface_->SetMode(UiInterface::Mode::STANDARD); | 980 html_interface_->SetMode(UiInterface::Mode::STANDARD); |
| 981 } | 981 } |
| 982 } | 982 } |
| 983 | 983 |
| 984 void VrShell::SetWebVRSecureOrigin(bool secure_origin) { | 984 void VrShell::SetWebVRSecureOrigin(bool secure_origin) { |
| 985 html_interface_->SetSecureOrigin(secure_origin); | 985 // TODO(cjgrant): Align this state with the logic that drives the omnibox. |
| 986 html_interface_->SetWebVRSecureOrigin(secure_origin); |
| 986 } | 987 } |
| 987 | 988 |
| 988 void VrShell::SubmitWebVRFrame() {} | 989 void VrShell::SubmitWebVRFrame() {} |
| 989 | 990 |
| 990 void VrShell::UpdateWebVRTextureBounds(const gvr::Rectf& left_bounds, | 991 void VrShell::UpdateWebVRTextureBounds(const gvr::Rectf& left_bounds, |
| 991 const gvr::Rectf& right_bounds) { | 992 const gvr::Rectf& right_bounds) { |
| 992 webvr_left_viewport_->SetSourceUv(left_bounds); | 993 webvr_left_viewport_->SetSourceUv(left_bounds); |
| 993 webvr_right_viewport_->SetSourceUv(right_bounds); | 994 webvr_right_viewport_->SetSourceUv(right_bounds); |
| 994 } | 995 } |
| 995 | 996 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 jboolean for_web_vr) { | 1147 jboolean for_web_vr) { |
| 1147 return reinterpret_cast<intptr_t>(new VrShell( | 1148 return reinterpret_cast<intptr_t>(new VrShell( |
| 1148 env, obj, content::WebContents::FromJavaWebContents(content_web_contents), | 1149 env, obj, content::WebContents::FromJavaWebContents(content_web_contents), |
| 1149 reinterpret_cast<ui::WindowAndroid*>(content_window_android), | 1150 reinterpret_cast<ui::WindowAndroid*>(content_window_android), |
| 1150 content::WebContents::FromJavaWebContents(ui_web_contents), | 1151 content::WebContents::FromJavaWebContents(ui_web_contents), |
| 1151 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), | 1152 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), |
| 1152 for_web_vr)); | 1153 for_web_vr)); |
| 1153 } | 1154 } |
| 1154 | 1155 |
| 1155 } // namespace vr_shell | 1156 } // namespace vr_shell |
| OLD | NEW |