summaryrefslogtreecommitdiffstats
path: root/chrome/browser/android/tab_android.h
diff options
context:
space:
mode:
authorshashishekhar@chromium.org <shashishekhar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-30 04:51:05 +0000
committershashishekhar@chromium.org <shashishekhar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-30 04:51:05 +0000
commite087b77fbfc5f501df0eb0da4b16b4a788a45dc4 (patch)
treeebe15d05324e7fbfecfb139dde34374652c2c2f1 /chrome/browser/android/tab_android.h
parentf6f66d56c74c2542f70e5408611868714cbdef53 (diff)
downloadchromium_src-e087b77fbfc5f501df0eb0da4b16b4a788a45dc4.zip
chromium_src-e087b77fbfc5f501df0eb0da4b16b4a788a45dc4.tar.gz
chromium_src-e087b77fbfc5f501df0eb0da4b16b4a788a45dc4.tar.bz2
Add a new SyncedTabDelegate for Android.
Android can have tabs without any web contents. Tab association logic assumes that all tabs have web contents. This prevents Android from cleanly doing session reassociation. This change adds a SyncedTabDelegate which does not depend on existence of web contents. It also ensures that SessionID for a tab does not change when web contents get attached to the tab. BUG=139670, 125549 Review URL: https://chromiumcodereview.appspot.com/15499005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203071 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/android/tab_android.h')
-rw-r--r--chrome/browser/android/tab_android.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_android.h
index 46edfc5..ed92df1 100644
--- a/chrome/browser/android/tab_android.h
+++ b/chrome/browser/android/tab_android.h
@@ -10,6 +10,7 @@
#include "base/android/jni_helper.h"
#include "base/callback_forward.h"
#include "base/string16.h"
+#include "chrome/browser/sessions/session_id.h"
#include "chrome/browser/ui/toolbar/toolbar_model.h"
class GURL;
@@ -41,9 +42,7 @@ class TabAndroid {
virtual ToolbarModel::SecurityLevel GetSecurityLevel();
- int id() const {
- return tab_id_;
- }
+ const SessionID& id() const { return tab_id_; }
virtual void OnReceivedHttpAuthRequest(jobject auth_handler,
const string16& host,
@@ -78,10 +77,10 @@ class TabAndroid {
static void InitTabHelpers(content::WebContents* web_contents);
- static content::WebContents* InitWebContentsFromView(JNIEnv* env,
- jobject content_view);
+ content::WebContents* InitWebContentsFromView(JNIEnv* env,
+ jobject content_view);
- int tab_id_;
+ SessionID tab_id_;
private:
JavaObjectWeakGlobalRef weak_java_tab_;