summaryrefslogtreecommitdiffstats
path: root/base/android
Commit message (Collapse)AuthorAgeFilesLines
* Add @CalledByNative and @AccessedByNative annotations.simonb2014-09-031-0/+8
| | | | | | | | | | | Annotate postCallbackOnMainThread() method with @CalledByNative, and LibInfo fields with @AccessedByNative, for ProGuard. BUG= Review URL: https://codereview.chromium.org/539523003 Cr-Commit-Position: refs/heads/master@{#293168}
* [chromium linker] Check for null ParcelFileDescriptor before using it.avayvod2014-09-031-1/+2
| | | | | | | | | | | When CreateSharedRelro fails, the file descriptor read by LibInfo from the parcel will be null, but the child processes are trying to call its methods anyway. Added a check to avoid NPE. BUG=409826 Review URL: https://codereview.chromium.org/538543002 Cr-Commit-Position: refs/heads/master@{#293164}
* Fix conversions from 32-bit pointers to signed 64-bit integers.avayvod2014-09-031-2/+3
| | | | | | | | | | | | | | In case the address is a negative 32-bit integer (greater than 0x80000000), it is converted into 64-bit preserving the sign so all the leading bits are set. This results in an invalid 64-bit address. The conversion must be done via an unsigned 32-bit integer (uintptr_t). BUG=409826 Review URL: https://codereview.chromium.org/533173002 Cr-Commit-Position: refs/heads/master@{#293140}
* [Android] Add missing @VisibleForTesting annotations.aurimas2014-09-024-0/+24
| | | | | | | | | | | | Proguard strips these methods if they are not annotated because they are only used in tests. TBR=brettw BUG=163393 Review URL: https://codereview.chromium.org/528963003 Cr-Commit-Position: refs/heads/master@{#293009}
* Add a flag to let render process wait for java debuggerjaekyun2014-08-301-0/+3
| | | | | | | | | | | | A switch RENDERER_WAIT_FOR_JAVA_DEBUGGER is newly added to block ChildProcessMain thread of ChildProcessService until a Java debugger is attached. BUG=378975 Review URL: https://codereview.chromium.org/511683003 Cr-Commit-Position: refs/heads/master@{#292733}
* [Android] Mark posted UI thread tasks as asynchronousjdduke2014-08-291-2/+49
| | | | | | | | | | | | | | | | | | Chromium shares a message loop with Android on the browser UI thread. This can cause problems when the associated Looper has a sync barrier, preventing posted Chromium tasks from being dispatched until the barrier is removed. Make this sharing more fair by marking all Chromium Message tasks as asynchronous, avoiding stalls when there is a sync barrier. Note: This change is for gathering data about the perf impact and we'll revert it before cutting a release branch. BUG=407149,380781,407133 Review URL: https://codereview.chromium.org/512333002 Cr-Commit-Position: refs/heads/master@{#292551}
* Introduce @CalledByReflection annotation.aurimas2014-08-281-0/+24
| | | | | | | | BUG=163393 Review URL: https://codereview.chromium.org/509753002 Cr-Commit-Position: refs/heads/master@{#292394}
* Use content URI to upload photos taken by cameraqinmin2014-08-271-0/+28
| | | | | | | | | | | | Currently chrome creates a file path when uploading a photo taken through camera However, this doesn't always work. Instead, we should use content URI. See more details in the crbug. BUG=405593 Review URL: https://codereview.chromium.org/489053003 Cr-Commit-Position: refs/heads/master@{#292257}
* Switch from local random address generation to kernel ASLRsimonb@chromium.org2014-08-212-98/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current random base address generation in the Android chromium linker is prone to error. It selects an address at random between 0x20000000 and 0x40000000 and expects that this will be clear. This is occasionally untrue for ARM, but very often untrue for MIPS. As a consequence, RELRO sharing is being turned off more frequently than it could be. This change removes the local random address generation code and instead replaces it with code that speculatively maps a large region, captures the address returned by mmap, then unmaps and returns the address. The expectation is that this region will remain free for use when the time comes for the crazy linker to map the browser into it. This generally holds because the time between these two actions is short and little, if anything, loads or mmaps between them. Worst case is that RELRO sharing turns off as at present, but the probability of this happening should now be much lower. Note that capturing the address from mmap relies on Android ASLR being active for mmap. This is the default device state since ICS. The revised random browser load address is only as entropic as Android's ASLR. BUG=397634 Review URL: https://codereview.chromium.org/470053003 Cr-Commit-Position: refs/heads/master@{#291111} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291111 0039d316-1c4b-4281-b951-d872f2087c98
* Make class lookup lazy in jni_generator when using lazy method lookup.mkosiba@chromium.org2014-08-2124-369/+559
| | | | | | | | | | | | This removes the eager class registration from RegisterNatives when possible. BUG=402003 TBR=sievers@chromium.org, brettw@chromium.org, torne@chromium.org Review URL: https://codereview.chromium.org/491043002 Cr-Commit-Position: refs/heads/master@{#291095} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291095 0039d316-1c4b-4281-b951-d872f2087c98
* Add native libraries to gn apkscjhopman@chromium.org2014-08-213-35/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | First, change the NativeLibraries template to use preprocessor defines instead of includes. This allows us to delete all the corresponding headers. Then, change the ordered libraries file to be a dict with both the list of library paths and the java-style list of library names. Update a bunch of things that used the ordered libraries file to instead take the list of libraries directly as an argument (as a FileArg in every case). Add calculating the list of libraries to write_build_config and add it to the build config (gn can use this then instead of a separate ordered libraries file). Add a simple copy step in gn to set up the native libraries directory for an apk. Use this directory when creating the apk. BUG=359249 NOTRY=true Review URL: https://codereview.chromium.org/456493002 Cr-Commit-Position: refs/heads/master@{#290963} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290963 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 290810 "Make class lookup lazy in jni_generator when usin..."ygorshenin@chromium.org2014-08-2024-696/+370
| | | | | | | | | | | | | | | | | | > Make class lookup lazy in jni_generator when using lazy method lookup. > > This removes the eager class registration from RegisterNatives when possible. > > BUG=402003 > TBR=sievers@chromium.org, brettw@chromium.org > > Review URL: https://codereview.chromium.org/472553002 TBR=mkosiba@chromium.org Review URL: https://codereview.chromium.org/492713002 Cr-Commit-Position: refs/heads/master@{#290813} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290813 0039d316-1c4b-4281-b951-d872f2087c98
* Make class lookup lazy in jni_generator when using lazy method lookup.mkosiba@chromium.org2014-08-2024-370/+696
| | | | | | | | | | | | This removes the eager class registration from RegisterNatives when possible. BUG=402003 TBR=sievers@chromium.org, brettw@chromium.org Review URL: https://codereview.chromium.org/472553002 Cr-Commit-Position: refs/heads/master@{#290810} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290810 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Make ApplicationStatus thread safedtrainor@chromium.org2014-08-181-5/+11
| | | | | | | | | | | - Make sActivityInfo a ConcurrentHashMap instead of just a HashMap. BUG=403951 Review URL: https://codereview.chromium.org/479603003 Cr-Commit-Position: refs/heads/master@{#290379} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290379 0039d316-1c4b-4281-b951-d872f2087c98
* Fix cpplint warnings.simonb@chromium.org2014-08-141-9/+9
| | | | | | | | | | | | | | | Fixes: base/android/linker/linker_jni.cc:300: Single-parameter constructors should be marked explicit. [runtime/explicit] [5] base/android/linker/linker_jni.cc:313: Weird number of spaces at line-start. Are you using a 2-space indent? [whitespace/indent] [3] base/android/linker/linker_jni.cc:319: Weird number of spaces at line-start. Are you using a 2-space indent? [whitespace/indent] [3] base/android/linker/linker_jni.cc:320: Weird number of spaces at line-start. Are you using a 2-space indent? [whitespace/indent] [3] BUG= Review URL: https://codereview.chromium.org/470943002 Cr-Commit-Position: refs/heads/master@{#289642} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289642 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_util to base/files/ directory.brettw@chromium.org2014-08-131-1/+1
| | | | | | | | | | | This updates the includes in base but leaves a forwarding header for the rest of the project for now. R=yzshen@chromium.org Review URL: https://codereview.chromium.org/468253002 Cr-Commit-Position: refs/heads/master@{#289360} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289360 0039d316-1c4b-4281-b951-d872f2087c98
* Pass display names for uploaded content URI filesqinmin@chromium.org2014-08-121-1/+33
| | | | | | | | | | | | | The display names are missing for content URI files. That will cause some upload to fail. This CL translates the content URI to displayed name and passes them to native code. BUG=402537 Review URL: https://codereview.chromium.org/450003002 Cr-Commit-Position: refs/heads/master@{#289102} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289102 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Record UMA metrics after native initialization completes.feng@chromium.org2014-08-121-0/+3
| | | | | | | | | | | | | | | | Discoverd that we never got LibraryLoader.NativeLibraryHack in UMA histograms server. Found that's because UMA session was not started yet right after native libraries are loaded. By delaying recording until UMA session is started, these stats shown up in chrome://histograms. BUG=311644 Review URL: https://codereview.chromium.org/452923004 Cr-Commit-Position: refs/heads/master@{#289022} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289022 0039d316-1c4b-4281-b951-d872f2087c98
* The WebView has a path (early use of the CookieManager) whichhjd@chromium.org2014-08-113-15/+22
| | | | | | | | | | | | | | | | | | | | | needs access to the native command line arguments before we have initialized Chromium. This cl moves the setting up of the native command line to just after the LibraryLoaded.load step rather than just before the LibraryLoaded.initialise step. We remove the ability to pass the command line to initialize (which doesn't seem to be used) and remove the command line argument from the LibraryLoaded hook. You can access the native command line arguments instead which will have been set up. BUG=331424 Review URL: https://codereview.chromium.org/289303004 Cr-Commit-Position: refs/heads/master@{#288697} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288697 0039d316-1c4b-4281-b951-d872f2087c98
* Don't register JNI methods for the android_webview.mkosiba@chromium.org2014-08-113-11/+328
| | | | | | | | | | | | | | Rather than registering all jni bindings at startup, only get references to the class object for those files which require bindings. All others are satisfied by exporting symbols which can be found automatically by the VM. BUG=402003 Review URL: https://codereview.chromium.org/454923002 Cr-Commit-Position: refs/heads/master@{#288685} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288685 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Pass the right listener to DatePickerDialogmiguelg@chromium.org2014-07-311-0/+6
| | | | | | | | BUG=395768 Review URL: https://codereview.chromium.org/429633003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286791 0039d316-1c4b-4281-b951-d872f2087c98
* Observer Support for DistilledPagePrefssunangel@chromium.org2014-07-241-0/+24
| | | | | | | | | | | These changes provide support for observers for DistilledPagePrefs to listen to changes in DistilledPagePrefs. BUG=383630 Review URL: https://codereview.chromium.org/403323005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285109 0039d316-1c4b-4281-b951-d872f2087c98
* [android_webview] Introduce AwAssets to reference assets inside the apk.primiano@chromium.org2014-07-182-0/+19
| | | | | | | | | | | | | | This change introduces a utility class AwAssets, accessible by native, which is able to retrieve references (fd + offset + size) of assets inside the apk. This is to enable direct mmap of uncompressed assets. This change does NOT introduce yet any change to the WebView apk itself. At current state, no behavioral change is intended. BUG=394502 Review URL: https://codereview.chromium.org/401743003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284238 0039d316-1c4b-4281-b951-d872f2087c98
* Fix StackOverFlow in AdvancedMockContext.nyquist@chromium.org2014-07-181-0/+68
| | | | | | | | | | | | | | | | | | The AdvancedMockContext previously did not override registerComponentCallbacks and unregisterComponentCallbacks. The implementation of these methods in Context calls getApplicationContext before delegating the call to it, and since AdvancedMockContext returns |this| in getApplicationContext, this leads to a loop. This CL adds overrides for these two methods that make the calls to the base context instead, which will typically either be a MockContext or the target context being instrumented. BUG=394464 Review URL: https://codereview.chromium.org/404553005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284023 0039d316-1c4b-4281-b951-d872f2087c98
* Set parcel data position to 0 when cloning the relro bundle.simonb@chromium.org2014-07-101-5/+6
| | | | | | | | | | | | | | | | | | | | | | Rename local variable from 'p' to 'parcel. Call parcel.setDataPosition(0) between write and read. Fix a log message for punctuation. Fixes (from logcat): E/Bundle ( 5115): readBundle: bad magic number E/Bundle ( 5115): readBundle: trace = java.lang.RuntimeException E/Bundle ( 5115): at android.os.Bundle.readFromParcelInner(Bundle.java:1677) E/Bundle ( 5115): at android.os.Bundle.readFromParcel(Bundle.java:1670) E/Bundle ( 5115): at org.chromium.base.library_loader.Linker.useSharedRelros(Linker.java:494) E/Bundle ( 5115): at org.chromium.content.app.ChildProcessService$1.setupConnection(ChildProcessService.java:100) E/Bundle ( 5115): at org.chromium.content.common.IChildProcessService$Stub.onTransact(IChildProcessService.java:57) E/Bundle ( 5115): at android.os.Binder.execTransact(Binder.java:388) E/Bundle ( 5115): at dalvik.system.NativeStart.run(Native Method) BUG=388356 Review URL: https://codereview.chromium.org/371943003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282298 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compilation error encountered when DEBUG set to 1.simonb@chromium.org2014-07-081-1/+1
| | | | | | | | | | | | | | Fails to compiler if DEBUG is set to 1. If DEBUG is 0 the error is hidden because LOG_INFO() expands to an empty operation. Fixes: ../../base/android/linker/linker_jni.cc:270:60: error: 'lib_basename' was not declared in this scope BUG=390618 Review URL: https://codereview.chromium.org/375883002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281815 0039d316-1c4b-4281-b951-d872f2087c98
* Add switch for turning on library in zip file support.anton@chromium.org2014-07-011-3/+1
| | | | | | | | | | Note this patch doesn't enable the support (that is done in GYP). BUG= Review URL: https://codereview.chromium.org/359323002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280812 0039d316-1c4b-4281-b951-d872f2087c98
* Increase storage for Java exception information.ohrn@opera.com2014-07-011-1/+1
| | | | | | | | | | Nested exceptions have multiple stack traces with the most important one at the end. BUG=389474 Review URL: https://codereview.chromium.org/358853002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280793 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Add an error message for java exception crashboliu@chromium.org2014-06-281-14/+12
| | | | | | | | | | | | | | | We intentionally crash if jni called java code results in exception. However the CHECK is in native code. So many developers report the native stack, but not the java stack, which is usually more helpful. Add a message to the CHECK(false) for this. And also restructure the code a bit to avoid repeating the message. BUG= Review URL: https://codereview.chromium.org/355213002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280480 0039d316-1c4b-4281-b951-d872f2087c98
* Chromium Linker support for loading lib*.so from within an APK fileanton@chromium.org2014-06-273-47/+201
| | | | | | | | | | Split from https://codereview.chromium.org/301223005/ BUG= Review URL: https://codereview.chromium.org/358813002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280370 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for uncompress library in APK to the build systemanton@chromium.org2014-06-271-0/+12
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/334413006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280346 0039d316-1c4b-4281-b951-d872f2087c98
* Removes bulach@ from OWNERS.bulach@chromium.org2014-06-271-1/+0
| | | | | | | | | | | May our paths cross again soon! BUG= TBR=jochen@chromium.org,thakis@chromium.org Review URL: https://codereview.chromium.org/343323003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280313 0039d316-1c4b-4281-b951-d872f2087c98
* Fix comparison between signed and unsigned integer expressions.yfriedman@chromium.org2014-06-271-1/+2
| | | | | | | | Only see on internal bots. Review URL: https://codereview.chromium.org/353013008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280256 0039d316-1c4b-4281-b951-d872f2087c98
* Expose a low-end device mode override flags for non-android OSs as wellc.shu@samsung.com2014-06-265-46/+17
| | | | | | | | BUG=324824 Review URL: https://codereview.chromium.org/258663002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280024 0039d316-1c4b-4281-b951-d872f2087c98
* Add depfile support to android build scriptscjhopman@chromium.org2014-06-241-0/+16
| | | | | | | | | | | | | | | This adds the --depfile option to a bunch of android's build scripts (the ones used by gn). It also adds a simple function in build_utils to calculate the paths of the imported python files. Currently, the written depfiles just contain that list of python files (which is much more accurate than the way this is handled in gyp). BUG=359249 Review URL: https://codereview.chromium.org/341823003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279546 0039d316-1c4b-4281-b951-d872f2087c98
* Move FieldTrialHelper from chrome to base and call it FieldTrialList.maxbogue@chromium.org2014-06-214-0/+77
| | | | | | | | BUG=385213 Review URL: https://codereview.chromium.org/334953004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278957 0039d316-1c4b-4281-b951-d872f2087c98
* JarJar resources when building the android_webview.mkosiba@chromium.org2014-06-203-10/+55
| | | | | | | | | | | | | | | | | The android_webview build will require there only be a single R class (details in bug). This change makes the necessary changes to the build infrastructure for this to happen but the actual swap to building the webview this way will land as a subsequent CL. BUG=387155 build-only change, all trybots compile fine. NOTRY=true Review URL: https://codereview.chromium.org/255613003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278849 0039d316-1c4b-4281-b951-d872f2087c98
* Set chrome thread name in JVM.byungchul@chromium.org2014-06-202-2/+23
| | | | | | | | | | | | JVM's AttachCurrentThread() resets thread name if the caller doesn't pass thread name. Pass it first time call of AttachCurrentThread(). Not call next times to reduce syscall (prctl) overhead. BUG=384603 Review URL: https://codereview.chromium.org/330823004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278551 0039d316-1c4b-4281-b951-d872f2087c98
* Calling Shutdown() for Android content_browsertests. Removed webrtc test hack.starodub@google.com2014-06-181-1/+2
| | | | | | | | | | | | | | Should be landed after: https://codereview.chromium.org/323513003/ https://codereview.chromium.org/314293004/ which fix related shutdown issues. BUG=367409,373249 Review URL: https://codereview.chromium.org/319053006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277998 0039d316-1c4b-4281-b951-d872f2087c98
* Android: enable chromium linker on the shells.bulach@chromium.org2014-06-171-5/+14
| | | | | | | | | | | Chromium linker has been enabled for the full chrome, and should also be exercised by content / chrome shells. BUG=382485 Review URL: https://codereview.chromium.org/329223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277892 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Java Bridge with Gin: implement Java methods invocationmnaganov@chromium.org2014-06-125-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds GinJavaMethodInvocationHelper class which serves for coercion of arguments and return values of Java methods to / from base::Value and GinJavaBridgeValue. The coercion code is taken from the existing implementation (JavaBoundObject) with required conversions to use base::Value and GinJavaBridgeValue instead of NPVARIANT and friends. There are extensive Java tests for coercion, so here we only add some unit tests for edge cases. This patch also adds a trivial EventLog class for writing into Android Event Log from C++ code. BUG=355644 R=bulach@chromium.org, torne@chromium.org TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/302173006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276586 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 275652 "Remove unneeded JNI registrations."torne@chromium.org2014-06-093-328/+11
| | | | | | | | | | | | | | | | | | | | | | | | | This has broken the Android WebView build by introducing an absolute path into the generated makefiles, rendering them nonportable. > Remove unneeded JNI registrations. > > Rather than registering all jni bindings at startup, only get references > to the class object for those files which require bindings. All others > are satisfied by exporting symbols which can be found automatically by > dalvik. > > This patch replaces excldue-libs=ALL with ld version script to strip unwanted > symbols: https://sourceware.org/binutils/docs-2.24/ld/VERSION.html#VERSION > > BUG= > > Review URL: https://codereview.chromium.org/147533004 TBR=sl.ostapenko@samsung.com Review URL: https://codereview.chromium.org/326603002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275796 0039d316-1c4b-4281-b951-d872f2087c98
* Remove myself from OWNERS files.pliard@chromium.org2014-06-081-1/+0
| | | | | | | | I'm switching to a new project. Review URL: https://codereview.chromium.org/313963009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275752 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded JNI registrations.sl.ostapenko@samsung.com2014-06-073-11/+328
| | | | | | | | | | | | | | | | Rather than registering all jni bindings at startup, only get references to the class object for those files which require bindings. All others are satisfied by exporting symbols which can be found automatically by dalvik. This patch replaces excldue-libs=ALL with ld version script to strip unwanted symbols: https://sourceware.org/binutils/docs-2.24/ld/VERSION.html#VERSION BUG= Review URL: https://codereview.chromium.org/147533004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275652 0039d316-1c4b-4281-b951-d872f2087c98
* Add generate_jar_jni templatecjhopman@chromium.org2014-06-051-1/+1
| | | | | | | | | | | | | | | This implements jar_file_jni_generator.gypi for GN. Also, add the //ui/gl:surface_jni_headers and enable some targets that depend on it. BUG=359249 R=brettw@chromium.org,tfarina@chromium.org TBR=ben@chromium.org Review URL: https://codereview.chromium.org/294323002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275222 0039d316-1c4b-4281-b951-d872f2087c98
* Gamepad API support for chrome on androidskhatri@nvidia.com2014-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds code to get gamepad data from java objects and provide these updates to the GamepadProvider which then writes to GamepadHardwareBuffer which in turn is read by SharedMemoryReader and later returned by JS to the web page. This also adds new framework classes/methods required for Gamepad API support. Frameworks changes are responsible for : - Identifying gamepad devices and their capabilities. - Managing connected gamepad devices - Map the connected gamepad devices to standard Gamepad format. - Keeping gamepads axes/buttons data up-to-date and returning it to native whenever requested. In android we cannot get gamepad data directly from sources, so framework is modified to capture gamepad key and motion events and extract gamepad data from these events. * Class GamepadPlatformDataFetcherAndroid : Android specific implementation of gamepad data fetcher. - Responsible for communication with java class and accessing gamepad data. - It adds methods for communication with singleton java GamepadList class to get gamepads data. * Class ContentViewCore : Manages gamepad list and notifies of new key/motion event for gamepads. * Class GamepadList : A new class to manage connected gamepad devices * Class GamepadDevice : A new class to manage information related to each gamepad device. * Class GamepadMappings : This class is responsible for mapping of known gamepads to the standard gamepad. This change enables gamepad API by default. Adds support for parsing float array return type in JNI generator. NVIDIA Shield and XBox360 gamepads are mapped to the standard gamepad BUG=330094 TEST=http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html R=tsepez@chromium.org R=darin@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270620 Review URL: https://codereview.chromium.org/133943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274212 0039d316-1c4b-4281-b951-d872f2087c98
* Unconditionally log chromium android linker errors.simonb@chromium.org2014-05-281-2/+1
| | | | | | | | | | | | | | | | | | Always print crazy linker error messages to logcat, instead of only when debug tracing is enabled. Before: E/chromium_android_linker(11242): Unable to load library: libchrome.2016.0.so After: E/chromium_android_linker(11641): LoadLibrary: Could not open libchrome.2016.0.so: Could not find symbol 'isnanf' E/chromium_android_linker(11641): Unable to load library: libchrome.2016.0.so BUG=376828 Review URL: https://codereview.chromium.org/298323002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273269 0039d316-1c4b-4281-b951-d872f2087c98
* Updating JNIAdditionalImport to allow more than one import.qsr@chromium.org2014-05-235-12/+127
| | | | | | | | R=bulach@chromium.org Review URL: https://codereview.chromium.org/298973005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272524 0039d316-1c4b-4281-b951-d872f2087c98
* base/android/OWNERS: adds rmcilroybulach@chromium.org2014-05-221-0/+1
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/289403002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272107 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Gamepad API support for chrome on android ↵aelias@chromium.org2014-05-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/133943002/) Reason for revert: Gamepad list lookup causes a startup crash on Ice Cream Sandwich devices. Please reland after adding the appropriate version check and testing locally (note: you don't need to get OWNERS approval a second time when relanding if you reupload to this codereview entry instead of creating a new one). TBR=feng@chromium.org NOTRY=true Original issue's description: > Gamepad API support for chrome on android > > This change adds code to get gamepad data from java objects and > provide these updates to the GamepadProvider which then writes to > GamepadHardwareBuffer which in turn is read by SharedMemoryReader and > later returned by JS to the web page. > > Added singleton class GamepadsReader which is responsible for > communication with java class and accessing gamepad data. It adds > methods for communication with singleton java GamepadList class to > get gamepads data. > > This also adds new framework classes/methods required for Gamepad API > support. Frameworks changes are responsible for : > - Identifying gamepad devices and their capabilities. > - Managing connected gamepad devices > - Map the connected gamepad devices to standard Gamepad format. > - Keeping gamepads axes/buttons data up-to-date and returning it to > native whenever requested. In android we cannot get gamepad data > directly from sources, so framework is modified to capture > gamepad key and motion events and extract gamepad data from these > events. > > * Class GamepadPlatformDataFetcherAndroid : Android specific > implementation of gamepad data fetcher. > > * Class ContentViewCore : Manages gamepad list and notifies of new > key/motion event for gamepads. > > * Class GamepadList : A new class to manage connected gamepad devices > > * Class GamepadDevice : A new class to manage information related to > each gamepad device. > > * Class GamepadMappings : This class is responsible for mapping of > known gamepads to the standard gamepad. > > This change enables gamepad API by default. > > Adds support for parsing float array return type in JNI generator. > > NVIDIA Shield and XBox360 gamepads are mapped to the standard gamepad > > BUG=330094 > > TEST=http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html > > R=tsepez@chromium.org > R=darin@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270620 Review URL: https://codereview.chromium.org/298483002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271452 0039d316-1c4b-4281-b951-d872f2087c98