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

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

Issue 2640143002: Allow autoplay unmuted for WebAPK in the manifest scope (Closed)
Patch Set: not using command line Created 3 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TAB_ANDROID_H_ 5 #ifndef CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
6 #define CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ 6 #define CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // TODO(dtrainor): Remove this, pull content_layer() on demand. 224 // TODO(dtrainor): Remove this, pull content_layer() on demand.
225 void AttachToTabContentManager( 225 void AttachToTabContentManager(
226 JNIEnv* env, 226 JNIEnv* env,
227 const base::android::JavaParamRef<jobject>& obj, 227 const base::android::JavaParamRef<jobject>& obj,
228 const base::android::JavaParamRef<jobject>& jtab_content_manager); 228 const base::android::JavaParamRef<jobject>& jtab_content_manager);
229 229
230 bool HasPrerenderedUrl(JNIEnv* env, 230 bool HasPrerenderedUrl(JNIEnv* env,
231 const base::android::JavaParamRef<jobject>& obj, 231 const base::android::JavaParamRef<jobject>& obj,
232 const base::android::JavaParamRef<jstring>& url); 232 const base::android::JavaParamRef<jstring>& url);
233 233
234 void SetWebappManifestScope(
Ted C 2017/02/15 05:07:25 ideally, I'd rather not see this hang off of Tab.
Zhiqiang Zhang (Slow) 2017/02/15 11:29:51 I agree :)
235 JNIEnv* env,
236 const base::android::JavaParamRef<jobject>& obj,
237 const base::android::JavaParamRef<jstring>& scope);
238
239 const std::string& GetWebappManifestScope() const {
240 return webapp_manifest_scope_;
241 }
242
234 // Register the Tab's native methods through JNI. 243 // Register the Tab's native methods through JNI.
235 static bool RegisterTabAndroid(JNIEnv* env); 244 static bool RegisterTabAndroid(JNIEnv* env);
236 245
237 private: 246 private:
238 prerender::PrerenderManager* GetPrerenderManager() const; 247 prerender::PrerenderManager* GetPrerenderManager() const;
239 248
240 JavaObjectWeakGlobalRef weak_java_tab_; 249 JavaObjectWeakGlobalRef weak_java_tab_;
241 250
242 // The identifier used by session restore for this tab. 251 // The identifier used by session restore for this tab.
243 SessionID session_tab_id_; 252 SessionID session_tab_id_;
244 253
245 // Identifier of the window the tab is in. 254 // Identifier of the window the tab is in.
246 SessionID session_window_id_; 255 SessionID session_window_id_;
247 256
248 content::NotificationRegistrar notification_registrar_; 257 content::NotificationRegistrar notification_registrar_;
249 258
250 scoped_refptr<cc::Layer> content_layer_; 259 scoped_refptr<cc::Layer> content_layer_;
251 android::TabContentManager* tab_content_manager_; 260 android::TabContentManager* tab_content_manager_;
252 261
253 std::unique_ptr<content::WebContents> web_contents_; 262 std::unique_ptr<content::WebContents> web_contents_;
254 std::unique_ptr<android::TabWebContentsDelegateAndroid> 263 std::unique_ptr<android::TabWebContentsDelegateAndroid>
255 web_contents_delegate_; 264 web_contents_delegate_;
256 265
257 std::unique_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; 266 std::unique_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_;
258 267
268 std::string webapp_manifest_scope_;
269
259 DISALLOW_COPY_AND_ASSIGN(TabAndroid); 270 DISALLOW_COPY_AND_ASSIGN(TabAndroid);
260 }; 271 };
261 272
262 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ 273 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698