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 28 matching lines...) Expand all Loading... |
39 } | 39 } |
40 | 40 |
41 namespace prerender { | 41 namespace prerender { |
42 class PrerenderManager; | 42 class PrerenderManager; |
43 } | 43 } |
44 | 44 |
45 class TabAndroid : public CoreTabHelperDelegate, | 45 class TabAndroid : public CoreTabHelperDelegate, |
46 public SearchTabHelperDelegate, | 46 public SearchTabHelperDelegate, |
47 public content::NotificationObserver { | 47 public content::NotificationObserver { |
48 public: | 48 public: |
| 49 // A Java counterpart will be generated for this enum. |
| 50 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser |
49 enum TabLoadStatus { | 51 enum TabLoadStatus { |
50 #define DEFINE_TAB_LOAD_STATUS(name, value) name = value, | 52 PAGE_LOAD_FAILED = 0, |
51 #include "chrome/browser/android/tab_load_status.h" | 53 DEFAULT_PAGE_LOAD = 1, |
52 #undef DEFINE_TAB_LOAD_STATUS | 54 PARTIAL_PRERENDERED_PAGE_LOAD = 2, |
| 55 FULL_PRERENDERED_PAGE_LOAD = 3, |
53 }; | 56 }; |
54 | 57 |
55 // Convenience method to retrieve the Tab associated with the passed | 58 // Convenience method to retrieve the Tab associated with the passed |
56 // WebContents. Can return NULL. | 59 // WebContents. Can return NULL. |
57 static TabAndroid* FromWebContents(content::WebContents* web_contents); | 60 static TabAndroid* FromWebContents(content::WebContents* web_contents); |
58 | 61 |
59 // Returns the native TabAndroid stored in the Java Tab represented by | 62 // Returns the native TabAndroid stored in the Java Tab represented by |
60 // |obj|. | 63 // |obj|. |
61 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj); | 64 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj); |
62 | 65 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 scoped_ptr<content::WebContents> web_contents_; | 175 scoped_ptr<content::WebContents> web_contents_; |
173 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> | 176 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> |
174 web_contents_delegate_; | 177 web_contents_delegate_; |
175 | 178 |
176 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; | 179 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; |
177 | 180 |
178 DISALLOW_COPY_AND_ASSIGN(TabAndroid); | 181 DISALLOW_COPY_AND_ASSIGN(TabAndroid); |
179 }; | 182 }; |
180 | 183 |
181 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 184 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
OLD | NEW |