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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 1399613002: Public glue layer plumbing for View#startActivityForResult (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 7962c18db76aa5b7efe6e365bd0caab65a0b06b0..bd2b8fe5640dabf0c06bdd2e689edfc51913ace8 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -8,6 +8,7 @@ import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.ComponentCallbacks2;
import android.content.Context;
+import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Canvas;
@@ -151,6 +152,11 @@ public class AwContents implements SmartClipProvider,
* @see View#getScrollBarStyle()
*/
int super_getScrollBarStyle();
+
+ /**
+ * @see View#startActivityForResult(Intent, int)
+ */
+ void super_startActivityForResult(Intent intent, int requestCode);
}
/**
@@ -2169,6 +2175,20 @@ public class AwContents implements SmartClipProvider,
// View and ViewGroup method implementations
//--------------------------------------------------------------------------------------------
+ public void startActivityForResult(Intent intent, int requestCode) {
+ assert ContentViewCore.activityFromContext(mContext) != null;
sgurun-gerrit only 2015/10/16 00:06:53 same comment about assert. it will throw an except
hush (inactive) 2015/10/20 23:16:09 Done.
+
+ // A RuntimeException will be thrown by Android framework if
sgurun-gerrit only 2015/10/16 00:06:53 move the documentation to method level where it is
hush (inactive) 2015/10/20 23:16:09 Done.
+ // startActivityForResult is called with a non-Activity context.
+ mFullScreenTransitionsState.getInitialInternalAccessDelegate()
+ .super_startActivityForResult(intent, requestCode);
+ }
+
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ // TODO(hush): Forward the activity result to content view core and
+ // replace the text with translated text.
+ }
+
/**
* @see android.webkit.View#onTouchEvent()
*/

Powered by Google App Engine
This is Rietveld 408576698