OLD | NEW |
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" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 namespace content { | 44 namespace content { |
45 class ContentViewCore; | 45 class ContentViewCore; |
46 class WebContents; | 46 class WebContents; |
47 } | 47 } |
48 | 48 |
49 namespace infobars { | 49 namespace infobars { |
50 class InfoBar; | 50 class InfoBar; |
51 } | 51 } |
52 | 52 |
53 namespace offline_pages { | |
54 struct OfflinePageItem; | |
55 } | |
56 | |
57 namespace prerender { | 53 namespace prerender { |
58 class PrerenderManager; | 54 class PrerenderManager; |
59 } | 55 } |
60 | 56 |
61 class TabAndroid : public CoreTabHelperDelegate, | 57 class TabAndroid : public CoreTabHelperDelegate, |
62 public InstantServiceObserver, | 58 public InstantServiceObserver, |
63 public SearchTabHelperDelegate, | 59 public SearchTabHelperDelegate, |
64 public content::NotificationObserver, | 60 public content::NotificationObserver, |
65 public favicon::FaviconDriverObserver { | 61 public favicon::FaviconDriverObserver { |
66 public: | 62 public: |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 const base::android::JavaParamRef<jstring>& url); | 253 const base::android::JavaParamRef<jstring>& url); |
258 | 254 |
259 // Register the Tab's native methods through JNI. | 255 // Register the Tab's native methods through JNI. |
260 static bool RegisterTabAndroid(JNIEnv* env); | 256 static bool RegisterTabAndroid(JNIEnv* env); |
261 | 257 |
262 private: | 258 private: |
263 prerender::PrerenderManager* GetPrerenderManager() const; | 259 prerender::PrerenderManager* GetPrerenderManager() const; |
264 | 260 |
265 int64_t GetBookmarkIdHelper(bool only_editable) const; | 261 int64_t GetBookmarkIdHelper(bool only_editable) const; |
266 | 262 |
267 const offline_pages::OfflinePageItem* GetOfflinePage(const GURL& url) const; | |
268 | |
269 JavaObjectWeakGlobalRef weak_java_tab_; | 263 JavaObjectWeakGlobalRef weak_java_tab_; |
270 | 264 |
271 // The identifier used by session restore for this tab. | 265 // The identifier used by session restore for this tab. |
272 SessionID session_tab_id_; | 266 SessionID session_tab_id_; |
273 | 267 |
274 // Identifier of the window the tab is in. | 268 // Identifier of the window the tab is in. |
275 SessionID session_window_id_; | 269 SessionID session_window_id_; |
276 | 270 |
277 content::NotificationRegistrar notification_registrar_; | 271 content::NotificationRegistrar notification_registrar_; |
278 | 272 |
279 scoped_refptr<cc::Layer> content_layer_; | 273 scoped_refptr<cc::Layer> content_layer_; |
280 chrome::android::TabContentManager* tab_content_manager_; | 274 chrome::android::TabContentManager* tab_content_manager_; |
281 | 275 |
282 scoped_ptr<content::WebContents> web_contents_; | 276 scoped_ptr<content::WebContents> web_contents_; |
283 scoped_ptr<chrome::android::TabWebContentsDelegateAndroid> | 277 scoped_ptr<chrome::android::TabWebContentsDelegateAndroid> |
284 web_contents_delegate_; | 278 web_contents_delegate_; |
285 | 279 |
286 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; | 280 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; |
287 | 281 |
288 DISALLOW_COPY_AND_ASSIGN(TabAndroid); | 282 DISALLOW_COPY_AND_ASSIGN(TabAndroid); |
289 }; | 283 }; |
290 | 284 |
291 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 285 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
OLD | NEW |