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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1073 main_contents_->ExitFullscreen(true /* will_cause_resize */); | 1073 main_contents_->ExitFullscreen(true /* will_cause_resize */); |
1074 } else if (controller.CanGoBack()) { | 1074 } else if (controller.CanGoBack()) { |
1075 controller.GoBack(); | 1075 controller.GoBack(); |
1076 } | 1076 } |
1077 break; | 1077 break; |
1078 case HISTORY_FORWARD: | 1078 case HISTORY_FORWARD: |
1079 if (controller.CanGoForward()) | 1079 if (controller.CanGoForward()) |
1080 controller.GoForward(); | 1080 controller.GoForward(); |
1081 break; | 1081 break; |
1082 case RELOAD: | 1082 case RELOAD: |
1083 controller.Reload(false); | 1083 controller.Reload(content::ReloadType::NORMAL, false); |
Takashi Toyoshima
2016/12/15 06:21:51
Probably this false is ok. I assume vr_shell is so
| |
1084 break; | 1084 break; |
1085 #if defined(ENABLE_VR_SHELL_UI_DEV) | 1085 #if defined(ENABLE_VR_SHELL_UI_DEV) |
1086 case RELOAD_UI: | 1086 case RELOAD_UI: |
1087 ui_contents_->GetController().Reload(false); | 1087 ui_contents_->GetController().Reload(content::ReloadType::NORMAL, false); |
1088 html_interface_.reset(new UiInterface(UiInterface::Mode::STANDARD, | 1088 html_interface_.reset(new UiInterface(UiInterface::Mode::STANDARD, |
1089 main_contents_->IsFullscreen())); | 1089 main_contents_->IsFullscreen())); |
1090 vr_web_contents_observer_->SetUiInterface(html_interface_.get()); | 1090 vr_web_contents_observer_->SetUiInterface(html_interface_.get()); |
1091 break; | 1091 break; |
1092 #endif | 1092 #endif |
1093 case ZOOM_OUT: // Not handled yet. | 1093 case ZOOM_OUT: // Not handled yet. |
1094 case ZOOM_IN: // Not handled yet. | 1094 case ZOOM_IN: // Not handled yet. |
1095 break; | 1095 break; |
1096 default: | 1096 default: |
1097 NOTREACHED(); | 1097 NOTREACHED(); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1156 jboolean for_web_vr) { | 1156 jboolean for_web_vr) { |
1157 return reinterpret_cast<intptr_t>(new VrShell( | 1157 return reinterpret_cast<intptr_t>(new VrShell( |
1158 env, obj, content::WebContents::FromJavaWebContents(content_web_contents), | 1158 env, obj, content::WebContents::FromJavaWebContents(content_web_contents), |
1159 reinterpret_cast<ui::WindowAndroid*>(content_window_android), | 1159 reinterpret_cast<ui::WindowAndroid*>(content_window_android), |
1160 content::WebContents::FromJavaWebContents(ui_web_contents), | 1160 content::WebContents::FromJavaWebContents(ui_web_contents), |
1161 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), | 1161 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), |
1162 for_web_vr)); | 1162 for_web_vr)); |
1163 } | 1163 } |
1164 | 1164 |
1165 } // namespace vr_shell | 1165 } // namespace vr_shell |
OLD | NEW |