| 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 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 jint id); | 121 jint id); |
| 122 base::android::ScopedJavaGlobalRef<jobject> TakeContentSurface( | 122 base::android::ScopedJavaGlobalRef<jobject> TakeContentSurface( |
| 123 JNIEnv* env, | 123 JNIEnv* env, |
| 124 const base::android::JavaParamRef<jobject>& obj); | 124 const base::android::JavaParamRef<jobject>& obj); |
| 125 void RestoreContentSurface(JNIEnv* env, | 125 void RestoreContentSurface(JNIEnv* env, |
| 126 const base::android::JavaParamRef<jobject>& obj); | 126 const base::android::JavaParamRef<jobject>& obj); |
| 127 void SetHistoryButtonsEnabled(JNIEnv* env, | 127 void SetHistoryButtonsEnabled(JNIEnv* env, |
| 128 const base::android::JavaParamRef<jobject>& obj, | 128 const base::android::JavaParamRef<jobject>& obj, |
| 129 jboolean can_go_back, | 129 jboolean can_go_back, |
| 130 jboolean can_go_forward); | 130 jboolean can_go_forward); |
| 131 void RequestUiElementInfoForTesting( |
| 132 JNIEnv* env, |
| 133 const base::android::JavaParamRef<jobject>& obj, |
| 134 jobjectArray element_names, |
| 135 jint callback_id); |
| 131 | 136 |
| 132 void ContentWebContentsDestroyed(); | 137 void ContentWebContentsDestroyed(); |
| 133 // Called when our WebContents have been hidden. Usually a sign that something | 138 // Called when our WebContents have been hidden. Usually a sign that something |
| 134 // like another tab placed in front of it. | 139 // like another tab placed in front of it. |
| 135 void ContentWasHidden(); | 140 void ContentWasHidden(); |
| 136 void ContentWasShown(); | 141 void ContentWasShown(); |
| 137 | 142 |
| 138 // html/js UI hooks. | 143 // html/js UI hooks. |
| 139 static base::WeakPtr<VrShell> GetWeakPtr( | 144 static base::WeakPtr<VrShell> GetWeakPtr( |
| 140 const content::WebContents* web_contents); | 145 const content::WebContents* web_contents); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 160 const base::android::JavaParamRef<jobject>& object, | 165 const base::android::JavaParamRef<jobject>& object, |
| 161 jint width, | 166 jint width, |
| 162 jint height, | 167 jint height, |
| 163 jfloat dpr); | 168 jfloat dpr); |
| 164 | 169 |
| 165 void UpdateScene(const base::ListValue* args); | 170 void UpdateScene(const base::ListValue* args); |
| 166 | 171 |
| 167 // Perform a UI action triggered by the javascript API. | 172 // Perform a UI action triggered by the javascript API. |
| 168 void DoUiAction(const UiAction action, | 173 void DoUiAction(const UiAction action, |
| 169 const base::DictionaryValue* arguments); | 174 const base::DictionaryValue* arguments); |
| 175 void OnUiElementInfoCreated(int callback_id, |
| 176 std::unique_ptr<base::DictionaryValue> info); |
| 170 | 177 |
| 171 void SetContentCssSize(float width, float height, float dpr); | 178 void SetContentCssSize(float width, float height, float dpr); |
| 172 void SetUiCssSize(float width, float height, float dpr); | 179 void SetUiCssSize(float width, float height, float dpr); |
| 173 | 180 |
| 174 void ContentFrameWasResized(bool width_changed); | 181 void ContentFrameWasResized(bool width_changed); |
| 175 | 182 |
| 176 void ForceExitVr(); | 183 void ForceExitVr(); |
| 177 | 184 |
| 178 void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event); | 185 void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event); |
| 179 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event); | 186 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 271 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 265 | 272 |
| 266 DISALLOW_COPY_AND_ASSIGN(VrShell); | 273 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 267 }; | 274 }; |
| 268 | 275 |
| 269 bool RegisterVrShell(JNIEnv* env); | 276 bool RegisterVrShell(JNIEnv* env); |
| 270 | 277 |
| 271 } // namespace vr_shell | 278 } // namespace vr_shell |
| 272 | 279 |
| 273 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 280 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |