summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_android.gypi
diff options
context:
space:
mode:
authoryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 18:19:48 +0000
committeryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 18:19:48 +0000
commita0f4da6c6646402f6d65d64fc8944cc3ef1ca7e6 (patch)
treeebdb7b793c26abdd0450440b6b364e843f13b5a4 /chrome/chrome_android.gypi
parent51cea8ecdfac3d655f19b27ab4ad59a49401043d (diff)
downloadchromium_src-a0f4da6c6646402f6d65d64fc8944cc3ef1ca7e6.zip
chromium_src-a0f4da6c6646402f6d65d64fc8944cc3ef1ca7e6.tar.gz
chromium_src-a0f4da6c6646402f6d65d64fc8944cc3ef1ca7e6.tar.bz2
[Android] Introduce a Java parent class for Tab to mirror native class.
Previously, there was only TabAndroid on the native side and no java counterpart. This makes it impossible to share code between testshell and Chrome on Android because Java is needed to interact with Android views and native with the rest of chrome. Getting the write native pointers assigned is tricky and the flow is as follow: Consumers should subclass TabBase in Java and TabAndroid in native. Construction of the Java subclass initializes the native subclass which passes the java pointer to TabAndroid so that TabAndroid can associate the java parent class (TabBase) with it. Destruction follows a similar flow. Once this building block is in place, I'll move more of TestShellTab into TabBase to re-use it. It also opens the door to upstream more of Tab. Also moves testshell-specific classes to the testshell libraries and out of Chrome for android. BUG=159202 TBR=sky NOTRY=true Review URL: https://chromiumcodereview.appspot.com/12962006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome_android.gypi')
-rw-r--r--chrome/chrome_android.gypi15
1 files changed, 14 insertions, 1 deletions
diff --git a/chrome/chrome_android.gypi b/chrome/chrome_android.gypi
index 1118407..9cd77f1 100644
--- a/chrome/chrome_android.gypi
+++ b/chrome/chrome_android.gypi
@@ -17,6 +17,7 @@
'../base/base.gyp:base',
'../jingle/jingle.gyp:notifier',
'chrome_android_core',
+ 'chromium_testshell_jni_headers',
'chrome.gyp:browser_ui',
],
'sources': [
@@ -28,10 +29,11 @@
'android/testshell/chrome_main_delegate_testshell_android.h',
"android/testshell/testshell_google_location_settings_helper.cc",
"android/testshell/testshell_google_location_settings_helper.h",
+ 'android/testshell/testshell_tab.cc',
+ 'android/testshell/testshell_tab.h',
'android/testshell/testshell_stubs.cc',
],
'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/android',
'<(SHARED_INTERMEDIATE_DIR)/chromium_testshell',
'../skia/config',
],
@@ -69,6 +71,17 @@
'includes': [ '../build/java_apk.gypi', ],
},
{
+ 'target_name': 'chromium_testshell_jni_headers',
+ 'type': 'none',
+ 'sources': [
+ 'android/testshell/java/src/org/chromium/chrome/testshell/TestShellTab.java',
+ ],
+ 'variables': {
+ 'jni_gen_package': 'chromium_testshell',
+ },
+ 'includes': [ '../build/jni_generator.gypi' ],
+ },
+ {
# chromium_testshell creates a .jar as a side effect. Any java targets
# that need that .jar in their classpath should depend on this target,
# chromium_testshell_java. Dependents of chromium_testshell receive its