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