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 RequestUiElementInfo(JNIEnv* env, |
| 132 const base::android::JavaParamRef<jobject>& obj, |
| 133 jintArray element_ids, |
| 134 jint callback_id); |
131 | 135 |
132 void ContentWebContentsDestroyed(); | 136 void ContentWebContentsDestroyed(); |
133 // Called when our WebContents have been hidden. Usually a sign that something | 137 // Called when our WebContents have been hidden. Usually a sign that something |
134 // like another tab placed in front of it. | 138 // like another tab placed in front of it. |
135 void ContentWasHidden(); | 139 void ContentWasHidden(); |
136 void ContentWasShown(); | 140 void ContentWasShown(); |
137 | 141 |
138 // html/js UI hooks. | 142 // html/js UI hooks. |
139 static base::WeakPtr<VrShell> GetWeakPtr( | 143 static base::WeakPtr<VrShell> GetWeakPtr( |
140 const content::WebContents* web_contents); | 144 const content::WebContents* web_contents); |
(...skipping 19 matching lines...) Expand all Loading... |
160 const base::android::JavaParamRef<jobject>& object, | 164 const base::android::JavaParamRef<jobject>& object, |
161 jint width, | 165 jint width, |
162 jint height, | 166 jint height, |
163 jfloat dpr); | 167 jfloat dpr); |
164 | 168 |
165 void UpdateScene(const base::ListValue* args); | 169 void UpdateScene(const base::ListValue* args); |
166 | 170 |
167 // Perform a UI action triggered by the javascript API. | 171 // Perform a UI action triggered by the javascript API. |
168 void DoUiAction(const UiAction action, | 172 void DoUiAction(const UiAction action, |
169 const base::DictionaryValue* arguments); | 173 const base::DictionaryValue* arguments); |
| 174 void OnUiElementInfoCreated(int callback_id, |
| 175 std::unique_ptr<base::DictionaryValue> info); |
170 | 176 |
171 void SetContentCssSize(float width, float height, float dpr); | 177 void SetContentCssSize(float width, float height, float dpr); |
172 void SetUiCssSize(float width, float height, float dpr); | 178 void SetUiCssSize(float width, float height, float dpr); |
173 | 179 |
174 void ContentFrameWasResized(bool width_changed); | 180 void ContentFrameWasResized(bool width_changed); |
175 | 181 |
176 void ForceExitVr(); | 182 void ForceExitVr(); |
177 | 183 |
178 void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event); | 184 void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event); |
179 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... |
264 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 270 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
265 | 271 |
266 DISALLOW_COPY_AND_ASSIGN(VrShell); | 272 DISALLOW_COPY_AND_ASSIGN(VrShell); |
267 }; | 273 }; |
268 | 274 |
269 bool RegisterVrShell(JNIEnv* env); | 275 bool RegisterVrShell(JNIEnv* env); |
270 | 276 |
271 } // namespace vr_shell | 277 } // namespace vr_shell |
272 | 278 |
273 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 279 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
OLD | NEW |