| 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 package org.chromium.chrome.browser.vr_shell; | 5 package org.chromium.chrome.browser.vr_shell; |
| 6 | 6 |
| 7 import android.widget.FrameLayout; | 7 import android.widget.FrameLayout; |
| 8 | 8 |
| 9 import org.chromium.chrome.browser.tab.Tab; | 9 import org.chromium.chrome.browser.tab.Tab; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * Abstracts away the VrShell class, which may or may not be present at runtime
depending on | 12 * Abstracts away the VrShell class, which may or may not be present at runtime
depending on |
| 13 * compile flags. | 13 * compile flags. |
| 14 */ | 14 */ |
| 15 public interface VrShellInterface { | 15 public interface VrShellInterface { |
| 16 /** | 16 /** |
| 17 * Performs native VrShell initialization. | 17 * Performs native VrShell initialization. |
| 18 */ | 18 */ |
| 19 void onNativeLibraryReady(Tab currentTab); | 19 void initializeNative(Tab currentTab, VrShellDelegate delegate); |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * Pauses VrShell. | 22 * Pauses VrShell. |
| 23 */ | 23 */ |
| 24 void pause(); | 24 void pause(); |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * Resumes VrShell. | 27 * Resumes VrShell. |
| 28 */ | 28 */ |
| 29 void resume(); | 29 void resume(); |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * Destroys VrShell. | 32 * Destroys VrShell. |
| 33 */ | 33 */ |
| 34 void teardown(); | 34 void teardown(); |
| 35 | 35 |
| 36 /** | 36 /** |
| 37 * Sets Android VR Mode to |enabled|. | 37 * Sets Android VR Mode to |enabled|. |
| 38 */ | 38 */ |
| 39 void setVrModeEnabled(boolean enabled); | 39 void setVrModeEnabled(boolean enabled); |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * Sets whether we're presenting WebVR content or not. |
| 43 */ |
| 44 void setWebVrModeEnabled(boolean enabled); |
| 45 |
| 46 /** |
| 42 * Returns the GVRLayout as a FrameLayout. | 47 * Returns the GVRLayout as a FrameLayout. |
| 43 */ | 48 */ |
| 44 FrameLayout getContainer(); | 49 FrameLayout getContainer(); |
| 45 } | 50 } |
| OLD | NEW |