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

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

Issue 900443003: Add support for ContentViewCore helpers on Tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 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
« no previous file with comments | « chrome/browser/android/DEPS ('k') | chrome/browser/android/tab_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9
10 #include "base/android/jni_weak_ref.h" 10 #include "base/android/jni_weak_ref.h"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "chrome/browser/favicon/favicon_tab_helper_observer.h" 14 #include "chrome/browser/favicon/favicon_tab_helper_observer.h"
15 #include "chrome/browser/search/instant_service_observer.h" 15 #include "chrome/browser/search/instant_service_observer.h"
16 #include "chrome/browser/sync/glue/synced_tab_delegate_android.h" 16 #include "chrome/browser/sync/glue/synced_tab_delegate_android.h"
17 #include "chrome/browser/ui/search/search_tab_helper_delegate.h" 17 #include "chrome/browser/ui/search/search_tab_helper_delegate.h"
18 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" 18 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h"
19 #include "chrome/browser/ui/toolbar/toolbar_model.h" 19 #include "chrome/browser/ui/toolbar/toolbar_model.h"
20 #include "components/sessions/session_id.h" 20 #include "components/sessions/session_id.h"
21 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
22 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
23 23
24 class GURL; 24 class GURL;
25 class Profile; 25 class Profile;
26 class SkBitmap; 26 class SkBitmap;
27 27
28 namespace cc {
29 class Layer;
30 }
31
28 namespace chrome { 32 namespace chrome {
29 struct NavigateParams; 33 struct NavigateParams;
30 } 34 }
31 35
32 namespace chrome { 36 namespace chrome {
33 namespace android { 37 namespace android {
34 class ChromeWebContentsDelegateAndroid; 38 class ChromeWebContentsDelegateAndroid;
39 class TabContentManager;
35 } 40 }
36 } 41 }
37 42
38 namespace content { 43 namespace content {
39 class ContentViewCore; 44 class ContentViewCore;
40 class WebContents; 45 class WebContents;
41 } 46 }
42 47
43 namespace prerender { 48 namespace prerender {
44 class PrerenderManager; 49 class PrerenderManager;
(...skipping 26 matching lines...) Expand all
71 static void AttachTabHelpers(content::WebContents* web_contents); 76 static void AttachTabHelpers(content::WebContents* web_contents);
72 77
73 TabAndroid(JNIEnv* env, jobject obj); 78 TabAndroid(JNIEnv* env, jobject obj);
74 ~TabAndroid() override; 79 ~TabAndroid() override;
75 80
76 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); 81 base::android::ScopedJavaLocalRef<jobject> GetJavaObject();
77 82
78 // Return the WebContents, if any, currently owned by this TabAndroid. 83 // Return the WebContents, if any, currently owned by this TabAndroid.
79 content::WebContents* web_contents() const { return web_contents_.get(); } 84 content::WebContents* web_contents() const { return web_contents_.get(); }
80 85
86 // Return the cc::Layer that represents the content for this TabAndroid.
87 scoped_refptr<cc::Layer> GetContentLayer() const;
88
81 // Return specific id information regarding this TabAndroid. 89 // Return specific id information regarding this TabAndroid.
82 const SessionID& session_id() const { return session_tab_id_; } 90 const SessionID& session_id() const { return session_tab_id_; }
83 int GetAndroidId() const; 91 int GetAndroidId() const;
84 int GetSyncId() const; 92 int GetSyncId() const;
85 93
86 // Return the tab title. 94 // Return the tab title.
87 base::string16 GetTitle() const; 95 base::string16 GetTitle() const;
88 96
89 // Return the tab url. 97 // Return the tab url.
90 GURL GetURL() const; 98 GURL GetURL() const;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 jint constraints, 187 jint constraints,
180 jint current, 188 jint current,
181 jboolean animate); 189 jboolean animate);
182 190
183 void SearchByImageInNewTabAsync(JNIEnv* env, jobject obj); 191 void SearchByImageInNewTabAsync(JNIEnv* env, jobject obj);
184 192
185 void SetInterceptNavigationDelegate(JNIEnv* env, 193 void SetInterceptNavigationDelegate(JNIEnv* env,
186 jobject obj, 194 jobject obj,
187 jobject delegate); 195 jobject delegate);
188 196
197 // TODO(dtrainor): Remove this, pull content_layer() on demand.
198 void AttachToTabContentManager(JNIEnv* env,
199 jobject obj,
200 jobject jtab_content_manager);
201
202 void AttachOverlayContentViewCore(JNIEnv* env,
203 jobject obj,
204 jobject jcontent_view_core,
205 jboolean visible);
206
207 void DetachOverlayContentViewCore(JNIEnv* env,
208 jobject obj,
209 jobject jcontent_view_core);
210
189 // Register the Tab's native methods through JNI. 211 // Register the Tab's native methods through JNI.
190 static bool RegisterTabAndroid(JNIEnv* env); 212 static bool RegisterTabAndroid(JNIEnv* env);
191 213
192 private: 214 private:
193 prerender::PrerenderManager* GetPrerenderManager() const; 215 prerender::PrerenderManager* GetPrerenderManager() const;
194 216
195 JavaObjectWeakGlobalRef weak_java_tab_; 217 JavaObjectWeakGlobalRef weak_java_tab_;
196 218
197 // The identifier used by session restore for this tab. 219 // The identifier used by session restore for this tab.
198 SessionID session_tab_id_; 220 SessionID session_tab_id_;
199 221
200 // Identifier of the window the tab is in. 222 // Identifier of the window the tab is in.
201 SessionID session_window_id_; 223 SessionID session_window_id_;
202 224
203 content::NotificationRegistrar notification_registrar_; 225 content::NotificationRegistrar notification_registrar_;
204 226
227 scoped_refptr<cc::Layer> content_layer_;
228 chrome::android::TabContentManager* tab_content_manager_;
229
205 scoped_ptr<content::WebContents> web_contents_; 230 scoped_ptr<content::WebContents> web_contents_;
206 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> 231 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid>
207 web_contents_delegate_; 232 web_contents_delegate_;
208 233
209 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; 234 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_;
210 235
211 DISALLOW_COPY_AND_ASSIGN(TabAndroid); 236 DISALLOW_COPY_AND_ASSIGN(TabAndroid);
212 }; 237 };
213 238
214 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ 239 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/DEPS ('k') | chrome/browser/android/tab_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698