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

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

Issue 2894973002: Provide WebContents::CreateParams to tab helpers. (Closed)
Patch Set: rebase Created 3 years, 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/android/tab_android.h" 5 #include "chrome/browser/android/tab_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return static_cast<TabAndroid*>(core_delegate); 112 return static_cast<TabAndroid*>(core_delegate);
113 } 113 }
114 114
115 TabAndroid* TabAndroid::GetNativeTab(JNIEnv* env, const JavaRef<jobject>& obj) { 115 TabAndroid* TabAndroid::GetNativeTab(JNIEnv* env, const JavaRef<jobject>& obj) {
116 return reinterpret_cast<TabAndroid*>(Java_Tab_getNativePtr(env, obj)); 116 return reinterpret_cast<TabAndroid*>(Java_Tab_getNativePtr(env, obj));
117 } 117 }
118 118
119 void TabAndroid::AttachTabHelpers(content::WebContents* web_contents) { 119 void TabAndroid::AttachTabHelpers(content::WebContents* web_contents) {
120 DCHECK(web_contents); 120 DCHECK(web_contents);
121 121
122 TabHelpers::AttachTabHelpers(web_contents); 122 TabHelpers::AttachTabHelpers(web_contents, base::nullopt);
123 } 123 }
124 124
125 TabAndroid::TabAndroid(JNIEnv* env, const JavaRef<jobject>& obj) 125 TabAndroid::TabAndroid(JNIEnv* env, const JavaRef<jobject>& obj)
126 : weak_java_tab_(env, obj), 126 : weak_java_tab_(env, obj),
127 content_layer_(cc::Layer::Create()), 127 content_layer_(cc::Layer::Create()),
128 tab_content_manager_(NULL), 128 tab_content_manager_(NULL),
129 synced_tab_delegate_(new browser_sync::SyncedTabDelegateAndroid(this)), 129 synced_tab_delegate_(new browser_sync::SyncedTabDelegateAndroid(this)),
130 embedded_media_experience_enabled_(false) { 130 embedded_media_experience_enabled_(false) {
131 Java_Tab_setNativePtr(env, obj, reinterpret_cast<intptr_t>(this)); 131 Java_Tab_setNativePtr(env, obj, reinterpret_cast<intptr_t>(this));
132 } 132 }
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { 813 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
814 TRACE_EVENT0("native", "TabAndroid::Init"); 814 TRACE_EVENT0("native", "TabAndroid::Init");
815 // This will automatically bind to the Java object and pass ownership there. 815 // This will automatically bind to the Java object and pass ownership there.
816 new TabAndroid(env, obj); 816 new TabAndroid(env, obj);
817 } 817 }
818 818
819 // static 819 // static
820 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { 820 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) {
821 return RegisterNativesImpl(env); 821 return RegisterNativesImpl(env);
822 } 822 }
OLDNEW
« no previous file with comments | « android_webview/browser/aw_web_contents_delegate.cc ('k') | chrome/browser/android/tab_web_contents_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698