Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2773903003: Add way to get native VR UI information from Java (Closed)
Patch Set: Cleanup Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698