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 "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 main_contents_->ExitFullscreen(true /* will_cause_resize */); | 359 main_contents_->ExitFullscreen(true /* will_cause_resize */); |
360 } else if (controller.CanGoBack()) { | 360 } else if (controller.CanGoBack()) { |
361 controller.GoBack(); | 361 controller.GoBack(); |
362 } | 362 } |
363 break; | 363 break; |
364 case HISTORY_FORWARD: | 364 case HISTORY_FORWARD: |
365 if (controller.CanGoForward()) | 365 if (controller.CanGoForward()) |
366 controller.GoForward(); | 366 controller.GoForward(); |
367 break; | 367 break; |
368 case RELOAD: | 368 case RELOAD: |
369 controller.Reload(false); | 369 controller.Reload(content::ReloadType::NORMAL, false); |
370 break; | 370 break; |
371 #if defined(ENABLE_VR_SHELL_UI_DEV) | 371 #if defined(ENABLE_VR_SHELL_UI_DEV) |
372 case RELOAD_UI: | 372 case RELOAD_UI: |
373 ui_contents_->GetController().Reload(false); | 373 ui_contents_->GetController().Reload(content::ReloadType::NORMAL, false); |
374 html_interface_.reset(new UiInterface(UiInterface::Mode::STANDARD, | 374 html_interface_.reset(new UiInterface(UiInterface::Mode::STANDARD, |
375 main_contents_->IsFullscreen())); | 375 main_contents_->IsFullscreen())); |
376 vr_web_contents_observer_->SetUiInterface(html_interface_.get()); | 376 vr_web_contents_observer_->SetUiInterface(html_interface_.get()); |
377 break; | 377 break; |
378 #endif | 378 #endif |
379 case ZOOM_OUT: // Not handled yet. | 379 case ZOOM_OUT: // Not handled yet. |
380 case ZOOM_IN: // Not handled yet. | 380 case ZOOM_IN: // Not handled yet. |
381 break; | 381 break; |
382 default: | 382 default: |
383 NOTREACHED(); | 383 NOTREACHED(); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 return reinterpret_cast<intptr_t>(new VrShell( | 457 return reinterpret_cast<intptr_t>(new VrShell( |
458 env, obj, content::WebContents::FromJavaWebContents(content_web_contents), | 458 env, obj, content::WebContents::FromJavaWebContents(content_web_contents), |
459 reinterpret_cast<ui::WindowAndroid*>(content_window_android), | 459 reinterpret_cast<ui::WindowAndroid*>(content_window_android), |
460 content::WebContents::FromJavaWebContents(ui_web_contents), | 460 content::WebContents::FromJavaWebContents(ui_web_contents), |
461 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), | 461 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), |
462 for_web_vr, VrShellDelegate::GetNativeDelegate(env, delegate), | 462 for_web_vr, VrShellDelegate::GetNativeDelegate(env, delegate), |
463 reinterpret_cast<gvr_context*>(gvr_api))); | 463 reinterpret_cast<gvr_context*>(gvr_api))); |
464 } | 464 } |
465 | 465 |
466 } // namespace vr_shell | 466 } // namespace vr_shell |
OLD | NEW |