summaryrefslogtreecommitdiffstats
path: root/base/android
Commit message (Collapse)AuthorAgeFilesLines
...
* Adding JNIAdditionalImport annotation.qsr@chromium.org2014-05-194-0/+152
| | | | | | | | | | | | The current JNI generator does not support using an inner class of an object that is in the same package as the class being processed. This CL add a new annotation to handle this case. R=bulach@chromium.org Review URL: https://codereview.chromium.org/290403002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271376 0039d316-1c4b-4281-b951-d872f2087c98
* Android: cleans up jni_generator_ptr_type.bulach@chromium.org2014-05-161-1/+0
| | | | | | | | | | | | | | The underlying rule is now "long" by default. Mechanical change: git grep -l jni_generator_ptr_type | xargs sed -i /jni_generator_ptr_type/d Relands crrev.com/270750 (reverted by 270849) BUG=317523 TBR=darin@chromium.org Review URL: https://codereview.chromium.org/288223005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271047 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 270750 "Android: cleans up jni_generator_ptr_type."jiayl@chromium.org2014-05-151-0/+1
| | | | | | | | | | | | | | | | | | | | | Suspected to cause Android Tests bot failure: http://build.chromium.org/p/chromium.linux/builders/Android%20Tests/builds/13592 > Android: cleans up jni_generator_ptr_type. > > The underlying rule is now "long" by default. > Mechanical change: > git grep -l jni_generator_ptr_type | xargs sed -i /jni_generator_ptr_type/d > > BUG=317523 > TBR=darin@chromium.org > > Review URL: https://codereview.chromium.org/288963002 TBR=bulach@chromium.org Review URL: https://codereview.chromium.org/292433004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270849 0039d316-1c4b-4281-b951-d872f2087c98
* Android: cleans up jni_generator_ptr_type.bulach@chromium.org2014-05-151-1/+0
| | | | | | | | | | | | | The underlying rule is now "long" by default. Mechanical change: git grep -l jni_generator_ptr_type | xargs sed -i /jni_generator_ptr_type/d BUG=317523 TBR=darin@chromium.org Review URL: https://codereview.chromium.org/288963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270750 0039d316-1c4b-4281-b951-d872f2087c98
* Gamepad API support for chrome on androidskhatri@nvidia.com2014-05-151-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. 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 Review URL: https://codereview.chromium.org/133943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270620 0039d316-1c4b-4281-b951-d872f2087c98
* Crazy linker fix forsimonb@chromium.org2014-05-132-27/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://code.google.com/p/chromium/issues/detail?id=355595 There is a race between the crazy linker running on the native thread and the system linker running at the same time on the main UI thread, It can show up in several places, but in its simplest incarnation appears as: --- crazy linker on native thread mprotect page writable --- system linker on main thread mprotect page writable write it mprotect page readonly --- crazy linker on native thread write it [ <- sigsegv, page readonly (code=2) ] mprotect page readonly [ not reached ] The patch moves the crazy linker's r_map update calls so that they execute on the main UI thread. This ensures that the crazy linker sets these pages writable and then readonly once done synchronously with system linker activity. Companion to: https://googleplex-android-review.git.corp.google.com/#/c/448556/ BUG=355595 Review URL: https://codereview.chromium.org/228023005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270084 0039d316-1c4b-4281-b951-d872f2087c98
* Android: optimizes jni_generator.bulach@chromium.org2014-05-101-5/+5
| | | | | | | | | | | | | | | ContentViewCore.java: Before: real 1m25.705s After: real 0m0.257s There was a few overly cautious "non-greedy" terminations, and a few optional matches outside their respective optional blocks. BUG=371520 Review URL: https://codereview.chromium.org/277753004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269575 0039d316-1c4b-4281-b951-d872f2087c98
* Android: turns into a buildtime error passing implicitly imported class.bulach@chromium.org2014-05-074-0/+160
| | | | | | | | | | | | | The JNI generator can't distinguish between a class in the same package and an implicitly imported class, resulting in a runtime error. Make it a build time error so those classes will have to be explicitly imported. BUG=368942 Review URL: https://codereview.chromium.org/267833002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268891 0039d316-1c4b-4281-b951-d872f2087c98
* Catch intptr_t to int conversion on 64-bit platforms.anton@chromium.org2014-05-0716-292/+414
| | | | | | | | | | | | | | | | Change the JNI generator to introduce a wrapper type jni_int_wrapper which is used to prevent implicit conversions which could be an intptr_t to int conversion. Change also includes fix (adding explicit case) for a false positive which existings in the code base. BUG=354405, 346626 Review URL: https://codereview.chromium.org/267893002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268741 0039d316-1c4b-4281-b951-d872f2087c98
* Fix local reference leak in JavaArrayOfByteArrayToStringVector.davidben@chromium.org2014-05-061-5/+6
| | | | | | | | | | | ReleaseByteArrayElements only releases the elements themselves, not the jbyteArray itself. Put that in a ScopedJavaLocalRef. BUG=none Review URL: https://codereview.chromium.org/268213002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268554 0039d316-1c4b-4281-b951-d872f2087c98
* Remove JNIEnv::NewStringUTF calls. Use ConvertUTF8ToJavaString instead.sungmann.cho@navercorp.com2014-05-021-1/+2
| | | | | | | | BUG=290232 Review URL: https://codereview.chromium.org/262803006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267684 0039d316-1c4b-4281-b951-d872f2087c98
* Remove jni_helper.h now that the rename is complete.newt@chromium.org2014-05-011-7/+0
| | | | | | | | | | | | | jni_helper.h has been renamed to jni_weak_ref.h and all references updated. BUG=365021 TBR=brettw NOTRY=true Review URL: https://codereview.chromium.org/260873003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267468 0039d316-1c4b-4281-b951-d872f2087c98
* Fix mismatched bookmark favicons on Android 4.2.1.newt@chromium.org2014-04-301-31/+25
| | | | | | | | | | | | | | | | Due to a platform bug in Android 4.2.1 (JB MR1), TextView.setCompoundDrawablesRelative() is a no-op if the view has ever been measured. As a workaround, we use setCompoundDrawables() directly. This bug caused the favicons on the bookmarks to appear next to the wrong bookmark (e.g. the Gmail favicon might appear next to the Twitter bookmark). This is now fixed. BUG=368196 Review URL: https://codereview.chromium.org/263473005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267298 0039d316-1c4b-4281-b951-d872f2087c98
* Disable strict mode for SysUtils#amountOfPhysicalMemoryKBcimamoglu@chromium.org2014-04-301-7/+5
| | | | | | | | | | | Also, remove an unused method. BUG=368633 BUG=328240 Review URL: https://codereview.chromium.org/255343003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267245 0039d316-1c4b-4281-b951-d872f2087c98
* TRACING: Enable java tracing from native alsoepenner@chromium.org2014-04-233-13/+39
| | | | | | | | | | | | | | | | | Currently java traces are enabled in Java only when tracing that is triggered from an Android intent. This flips it around so we always notify Java to start tracing, no matter how tracing is enabled. The case that wasn't working in this case is the 'dev tools tracing handler' which is how tracing is enabled for telemetry. BUG=None Review URL: https://codereview.chromium.org/237853005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265763 0039d316-1c4b-4281-b951-d872f2087c98
* Make use of cached trace state in TraceEventhush@chromium.org2014-04-231-0/+1
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/247143006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265727 0039d316-1c4b-4281-b951-d872f2087c98
* Rename jni_helper.h to jni_weak_ref.h.newt@chromium.org2014-04-233-39/+46
| | | | | | | | | BUG=365021 TBR=darin Review URL: https://codereview.chromium.org/247263009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265715 0039d316-1c4b-4281-b951-d872f2087c98
* Android: Make looper traces toplevel.epenner@chromium.org2014-04-152-5/+14
| | | | | | | | | | | | | All other top-level events are now labelled 'toplevel'. BUG=None NOTRY=true No-try since failing tests are flakes in unrelated code. Review URL: https://codereview.chromium.org/236203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263769 0039d316-1c4b-4281-b951-d872f2087c98
* For the WebView build, invoking "cpp" from $PATH is problematic on sometorne@chromium.org2014-04-141-14/+20
| | | | | | | | | | | | | | | | host platforms because the Android build system is intended to use hermetic toolchains. However, using the hermetic toolchain correctly is also difficult. To avoid this, use a regex to strip comments instead of invoking cpp. This regex shoud handle all the Java source cases correctly (it deals with strings that contain //, /* or */) and should also improve performance compared to invoking cpp. The JNI generator tests pass with this change. Review URL: https://codereview.chromium.org/227303003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263650 0039d316-1c4b-4281-b951-d872f2087c98
* Add workaround for TextView.setCompoundDrawablesRelative() on JB MR1.newt@chromium.org2014-04-111-0/+24
| | | | | | | | | | | | | | Due to a bug, TextView.setCompoundDrawablesRelative() is a no-op on JB MR1 if the text view has ever been measured. This is fixed in JB MR2 onwards, but causes some ugly bugs in Chrome on JB MR1: e.g. the favicons often don't appear on the bookmarks page. BUG=361709 NOTRY=true Review URL: https://codereview.chromium.org/232083005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263137 0039d316-1c4b-4281-b951-d872f2087c98
* base: Add ScopedJavaLocalFrame class.reveman@chromium.org2014-04-082-0/+35
| | | | | | | | | | | | | | This class can be used to create a local reference frame. A local reference frame ensures that some amount of local references can be created and forces all references created in the frame to be releases when exiting the frame. BUG=360069 TBR=darin Review URL: https://codereview.chromium.org/225283008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262273 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Remove an unused method from LibraryLoaderfeng@chromium.org2014-04-041-6/+0
| | | | | | | | | | | This is a post-fix after landing https://codereview.chromium.org/217283005/ and downstream changes in Chrome for Android. BUG=357655 Review URL: https://codereview.chromium.org/224613003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261851 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Fix a few issues related to old lib deletion.feng@chromium.org2014-04-032-32/+54
| | | | | | | | | | | | | | | | | | | | Discovered following issues: 1. after each native library load, the code starts a thread to delete old libs; 2. render process also tries to delete old libs; 3. Context.getDir(...) creates the directory if not existing, so existence test is always successful, and assertion may fail; The CL fixes these issues. LibraryLoader.ensureInitialized and LibraryLoader.loadNow have a second boolean parameter, inBrowserProcess, used by caller to indicate whether the code should try to delete old libs. BUG=357655 Review URL: https://codereview.chromium.org/217283005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261382 0039d316-1c4b-4281-b951-d872f2087c98
* Android: improves error message for Outer.Inner usage in JNI.bulach@chromium.org2014-03-282-0/+24
| | | | | | | | | | | The JNI generator was wrongly identifying Outer.Inner. Raise an exception with a clearer message. BUG= Review URL: https://codereview.chromium.org/214543002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260103 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Workaround of an android platform bug.feng@chromium.org2014-03-214-6/+367
| | | | | | | | | | | | | | | | On some Android devices (e.g., Sony Xperia), package manager may fail to extract native libraries when updating Chrome. The change tries alleviate the situation by: 1) name libchrome with version number; 2) when failed to load library, try to extract native libraies and load them. BUG=311644 Review URL: https://codereview.chromium.org/200753002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258546 0039d316-1c4b-4281-b951-d872f2087c98
* net: Update FileStream to use base::File instead of PlatformFile.rvargas@chromium.org2014-03-212-5/+5
| | | | | | | | | | | | | As collateral damage, OpenContentUriForRead is now returning File instead of a plain file descriptor. BUG=322664 TEST=net_unittests R=willchan@chromium.org Review URL: https://codereview.chromium.org/189393002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258472 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a unused method and fix some styles according to the style guide.sungmann.cho@navercorp.com2014-03-191-25/+13
| | | | | | Review URL: https://codereview.chromium.org/201543002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257921 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a brace style according to the style guide.sungmann.cho@navercorp.com2014-03-181-2/+1
| | | | | | Review URL: https://codereview.chromium.org/196653011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257696 0039d316-1c4b-4281-b951-d872f2087c98
* Change sWindowFocusListeners to mWindowFocusListeners.sungmann.cho@navercorp.com2014-03-181-4/+4
| | | | | | | | It's not a static field. Review URL: https://codereview.chromium.org/195793020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257550 0039d316-1c4b-4281-b951-d872f2087c98
* Expose size() and isEmpty() in ObserverList.mlamouri@chromium.org2014-03-142-4/+108
| | | | | | | | BUG=347558 Review URL: https://codereview.chromium.org/198093004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257094 0039d316-1c4b-4281-b951-d872f2087c98
* Add compatibility function for grabbing PendingIntent's creator package.dfalcantara@chromium.org2014-03-131-0/+13
| | | | | | | | BUG=341556 Review URL: https://codereview.chromium.org/197763003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256755 0039d316-1c4b-4281-b951-d872f2087c98
* Expose a set of all running Activitiesdtrainor@chromium.org2014-03-121-0/+15
| | | | | | | | BUG=341231 Review URL: https://codereview.chromium.org/189263014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256469 0039d316-1c4b-4281-b951-d872f2087c98
* Move atrace enabling code from Chrome to WebViewwangxianzhu@chromium.org2014-03-111-71/+14
| | | | | | | | | | | | | | | According to discussions, we decided to disable atrace for Chrome because of the inaccuracy of timing in the trace due to the overhead of atrace. As WebView still needs atrace, move the atrace enabling code into AwBrowserProcess. BUG=trace-viewer:454 (https://code.google.com/p/trace-viewer/issues/detail?id=454) Review URL: https://codereview.chromium.org/183183011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256186 0039d316-1c4b-4281-b951-d872f2087c98
* Android: minor improvements in SystemMessageHandler.bulach@chromium.org2014-03-111-11/+19
| | | | | | | | | | | | | - android.os.MessageQueue.removeMessage is somewhat expensive. It was calling that method for every single message, and re-inserting a new one with slightly lower delay everytime. Fix that by only scheduling a new message if it must happen sooner. BUG=349059 Review URL: https://codereview.chromium.org/180783017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256158 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Use CPU time (not wallclock time) where appropriate in Javajdduke@chromium.org2014-03-111-2/+3
| | | | | | | | | | Several pieces of code were using wallclock time (System.currentTimeMillis) for operations that were really dependent on CPU time. Switch them to using the appropriate SystemClock.uptimeMillis. Review URL: https://codereview.chromium.org/190773004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256077 0039d316-1c4b-4281-b951-d872f2087c98
* ObserverList.removeObserver() should not return true when null is being removed.mlamouri@chromium.org2014-03-102-2/+12
| | | | | | | | BUG=None Review URL: https://codereview.chromium.org/188783002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256057 0039d316-1c4b-4281-b951-d872f2087c98
* Always use the observer's index in ObserverList.removeObserver().mlamouri@chromium.org2014-03-101-1/+1
| | | | | | | | BUG=349925 Review URL: https://codereview.chromium.org/179793007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255924 0039d316-1c4b-4281-b951-d872f2087c98
* ObserverList add/remove methods should return a boolean.mlamouri@chromium.org2014-03-102-6/+42
| | | | | | | | BUG=347557 Review URL: https://codereview.chromium.org/182623003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255902 0039d316-1c4b-4281-b951-d872f2087c98
* Make kAllowedToAccessOnNonjoinableThread debug-only.thakis@chromium.org2014-03-061-0/+2
| | | | | | | | | | | | | This is only used in !NDEBUG builds, and making the variable only available there makes it harder to break -Wunused-const-variable builds with custom traits. Follow-up to r255159. BUG=349521,307668 R=fischman@chromium.org Review URL: https://codereview.chromium.org/187903007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255194 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Complete the WindowCallbackWrapper methods.boliu@chromium.org2014-03-051-1/+5
| | | | | | | | | BUG=349378 R=avayvod@chromium.org Review URL: https://codereview.chromium.org/180013008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255078 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromiumTestShell classes to ChromeShell.aurimas@chromium.org2014-03-051-1/+1
| | | | | | | | | | | | | Renaming ChromiumTestShell* classes to ChromeShell*. This CL depends on https://chromiumcodereview.appspot.com/184493006/ BUG=348137 NOTRY=true TBR=pfeldman,tonyg,craigdh Review URL: https://codereview.chromium.org/184993005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255073 0039d316-1c4b-4281-b951-d872f2087c98
* Suppress several false positive Android lint/javac warnings.newt@chromium.org2014-03-052-0/+3
| | | | | | | | NOTRY=true Review URL: https://codereview.chromium.org/182513002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254955 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] RTL layout direction function clean up.kkimlabs@chromium.org2014-03-041-6/+4
| | | | | | | | | | | | We used TextUtils#getLayoutDirectionFromLocale(Locale) function to get the layout direction, but Configuration#getLayoutDirection() is more correct function for our purpose. The result is the same. TBR=nyquist Review URL: https://codereview.chromium.org/186873002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254858 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build issues in base/ for Android x64yang.gu@intel.com2014-02-282-2/+3
| | | | | | | | | | | This CL fixes several issues when building files under base/ for Android x64. BUG=346626 Review URL: https://codereview.chromium.org/179373003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254124 0039d316-1c4b-4281-b951-d872f2087c98
* Android: fixes JNI generator for newer versions of javap.bulach@chromium.org2014-02-273-11/+2388
| | | | | | | | | | Follow up on crrev.com/253566, the javap output format has changed. BUG= Review URL: https://codereview.chromium.org/176763003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253871 0039d316-1c4b-4281-b951-d872f2087c98
* Android: generates JNI constants from .class files.bulach@chromium.org2014-02-265-35/+4793
| | | | | | | | | | | | | For our own classes, we use the "Foo.template" pre-processing trick. For system classes, there's no easy way to expose such constants to C++. Use the JNI generator to expose "public static final int" fields from java as a C++ enum. BUG= Review URL: https://codereview.chromium.org/180993004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253566 0039d316-1c4b-4281-b951-d872f2087c98
* Make Java event registration lazy for state listenerdtrainor@chromium.org2014-02-262-8/+14
| | | | | | | | | | | Move the Java registration outside of RegisterNativesImpl BUG=346342 NOTRY=true Review URL: https://codereview.chromium.org/179263002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253545 0039d316-1c4b-4281-b951-d872f2087c98
* Move PowerMonitor to Application Contextdtrainor@chromium.org2014-02-261-0/+6
| | | | | | | | BUG=341231 Review URL: https://codereview.chromium.org/167243005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253302 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor ActivityStatus to not store currentdtrainor@chromium.org2014-02-2116-488/+896
| | | | | | | | | | | | - Refactor ActivityStatus to expose application level visibility over activity visbility. - Add a listener for the visibility of the Application (are any Activities visible?) BUG=341231 NOTRY=true Review URL: https://codereview.chromium.org/159173002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252679 0039d316-1c4b-4281-b951-d872f2087c98
* Move DeviceMotionAndOrientation off Activity Contextdtrainor@chromium.org2014-02-211-47/+0
| | | | | | | | | | | - Get rid of WeakContext since it ties to the Activity and is only used in one place. - Move DeviceMotionAndOrientation onto the Application context BUG=341231 Review URL: https://codereview.chromium.org/167803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252629 0039d316-1c4b-4281-b951-d872f2087c98