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 <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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 } | 400 } |
401 case OMNIBOX_CONTENT: | 401 case OMNIBOX_CONTENT: |
402 html_interface_->HandleOmniboxInput(*arguments); | 402 html_interface_->HandleOmniboxInput(*arguments); |
403 break; | 403 break; |
404 case SET_CONTENT_PAUSED: { | 404 case SET_CONTENT_PAUSED: { |
405 bool paused; | 405 bool paused; |
406 CHECK(arguments->GetBoolean("paused", &paused)); | 406 CHECK(arguments->GetBoolean("paused", &paused)); |
407 SetContentPaused(paused); | 407 SetContentPaused(paused); |
408 break; | 408 break; |
409 } | 409 } |
| 410 case SHOW_TAB: { |
| 411 int id; |
| 412 CHECK(arguments->GetInteger("id", &id)); |
| 413 delegate_provider_->ShowTab(id); |
| 414 break; |
| 415 } |
410 #if defined(ENABLE_VR_SHELL_UI_DEV) | 416 #if defined(ENABLE_VR_SHELL_UI_DEV) |
411 case RELOAD_UI: | 417 case RELOAD_UI: |
412 ui_contents_->GetController().Reload(content::ReloadType::NORMAL, false); | 418 ui_contents_->GetController().Reload(content::ReloadType::NORMAL, false); |
413 html_interface_.reset(new UiInterface(UiInterface::Mode::STANDARD, | 419 html_interface_.reset(new UiInterface(UiInterface::Mode::STANDARD, |
414 main_contents_->IsFullscreen())); | 420 main_contents_->IsFullscreen())); |
415 vr_web_contents_observer_->SetUiInterface(html_interface_.get()); | 421 vr_web_contents_observer_->SetUiInterface(html_interface_.get()); |
416 break; | 422 break; |
417 #endif | 423 #endif |
418 case ZOOM_OUT: // Not handled yet. | 424 case ZOOM_OUT: // Not handled yet. |
419 case ZOOM_IN: // Not handled yet. | 425 case ZOOM_IN: // Not handled yet. |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 return reinterpret_cast<intptr_t>(new VrShell( | 611 return reinterpret_cast<intptr_t>(new VrShell( |
606 env, obj, content::WebContents::FromJavaWebContents(content_web_contents), | 612 env, obj, content::WebContents::FromJavaWebContents(content_web_contents), |
607 reinterpret_cast<ui::WindowAndroid*>(content_window_android), | 613 reinterpret_cast<ui::WindowAndroid*>(content_window_android), |
608 content::WebContents::FromJavaWebContents(ui_web_contents), | 614 content::WebContents::FromJavaWebContents(ui_web_contents), |
609 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), | 615 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), |
610 for_web_vr, VrShellDelegate::GetNativeVrShellDelegate(env, delegate), | 616 for_web_vr, VrShellDelegate::GetNativeVrShellDelegate(env, delegate), |
611 reinterpret_cast<gvr_context*>(gvr_api), reprojected_rendering)); | 617 reinterpret_cast<gvr_context*>(gvr_api), reprojected_rendering)); |
612 } | 618 } |
613 | 619 |
614 } // namespace vr_shell | 620 } // namespace vr_shell |
OLD | NEW |