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

Unified Diff: chrome/browser/android/tab_android.h

Issue 177013006: [Android] Move LoadUrl from Tab upstream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add java method Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/tab_android.h
diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_android.h
index 821c14c5da46f1cd339d771bb0f9a113590f19b3..8c0068b0a1569975e8333878233021f69157529e 100644
--- a/chrome/browser/android/tab_android.h
+++ b/chrome/browser/android/tab_android.h
@@ -37,9 +37,19 @@ class ContentViewCore;
class WebContents;
}
+namespace prerender {
+class PrerenderManager;
+}
+
class TabAndroid : public CoreTabHelperDelegate,
public content::NotificationObserver {
public:
+ enum TabLoadStatus {
+#define DEFINE_TAB_LOAD_STATUS(name,value) name = value,
David Trainor- moved to gerrit 2014/03/06 22:21:32 space before value?
Ted C 2014/03/06 22:30:43 Done.
+#include "chrome/browser/android/tab_load_status.h"
+#undef DEFINE_TAB_LOAD_STATUS
+ };
+
// Convenience method to retrieve the Tab associated with the passed
// WebContents. Can return NULL.
static TabAndroid* FromWebContents(content::WebContents* web_contents);
@@ -107,8 +117,7 @@ class TabAndroid : public CoreTabHelperDelegate,
// of service and the privacy notice.
virtual bool ShouldWelcomePageLinkToTermsOfService();
- // Register the Tab's native methods through JNI.
- static bool RegisterTabAndroid(JNIEnv* env);
+ bool HasPrerenderedUrl(GURL gurl);
// CoreTabHelperDelegate ----------------------------------------------------
@@ -138,6 +147,14 @@ class TabAndroid : public CoreTabHelperDelegate,
jobject obj);
base::android::ScopedJavaLocalRef<jobject> GetProfileAndroid(JNIEnv* env,
jobject obj);
+ virtual TabLoadStatus LoadUrl(JNIEnv* env,
+ jobject obj,
+ jstring url,
+ jstring j_extra_headers,
+ jbyteArray j_post_data,
+ jint page_transition,
+ jstring j_referrer_url,
+ jint referrer_policy);
ToolbarModel::SecurityLevel GetSecurityLevel(JNIEnv* env, jobject obj);
void SetActiveNavigationEntryTitleForUrl(JNIEnv* env,
jobject obj,
@@ -145,7 +162,12 @@ class TabAndroid : public CoreTabHelperDelegate,
jstring jtitle);
bool Print(JNIEnv* env, jobject obj);
+ // Register the Tab's native methods through JNI.
+ static bool RegisterTabAndroid(JNIEnv* env);
+
private:
+ prerender::PrerenderManager* GetPrerenderManager() const;
+
JavaObjectWeakGlobalRef weak_java_tab_;
// The identifier used by session restore for this tab.

Powered by Google App Engine
This is Rietveld 408576698