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

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/Shell.java

Issue 10823051: ContentShell rendering support on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix intents Created 8 years, 5 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: content/shell/android/java/src/org/chromium/content_shell/Shell.java
diff --git a/content/shell/android/java/src/org/chromium/content_shell/Shell.java b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
index b9eb8f0ea1e6215716ca5cbc06454d46a9a345b8..69414cd5372c5e68f9b5a5c5cdc05b8e89d23fc6 100644
--- a/content/shell/android/java/src/org/chromium/content_shell/Shell.java
+++ b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
@@ -46,6 +46,8 @@ public class Shell extends LinearLayout {
private ClipDrawable mProgressDrawable;
+ private View mSurfaceView;
+
/**
* Constructor for inflating via XML.
*/
@@ -53,17 +55,27 @@ public class Shell extends LinearLayout {
super(context, attrs);
}
+ /**
+ * Set the SurfaceView being renderered to as soon as it is available.
+ */
+ public void setSurfaceView(View surfaceView) {
+ mSurfaceView = surfaceView;
+ ((FrameLayout) findViewById(R.id.contentview_holder)).addView(mSurfaceView,
+ new FrameLayout.LayoutParams(
+ FrameLayout.LayoutParams.MATCH_PARENT,
+ FrameLayout.LayoutParams.MATCH_PARENT));
+ }
+
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mProgressDrawable = (ClipDrawable) findViewById(R.id.toolbar).getBackground();
-
- initilizeUrlField();
+ initializeUrlField();
initializeNavigationButtons();
}
- private void initilizeUrlField() {
+ private void initializeUrlField() {
mUrlTextView = (EditText) findViewById(R.id.url);
mUrlTextView.setOnEditorActionListener(new OnEditorActionListener() {
@Override

Powered by Google App Engine
This is Rietveld 408576698