diff options
author | b.kelemen@samsung.com <b.kelemen@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-26 12:01:15 +0000 |
---|---|---|
committer | b.kelemen@samsung.com <b.kelemen@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-26 12:01:15 +0000 |
commit | 91189b660f311cf35ddf222fcc8b53c7bb5b234a (patch) | |
tree | 1a0498d585590ef1c0d44be69a6839f9e3db9521 | |
parent | a712e7a0b022f1fe18653de2f2436cb2713cf689 (diff) | |
download | chromium_src-91189b660f311cf35ddf222fcc8b53c7bb5b234a.zip chromium_src-91189b660f311cf35ddf222fcc8b53c7bb5b234a.tar.gz chromium_src-91189b660f311cf35ddf222fcc8b53c7bb5b234a.tar.bz2 |
Don't miss to call ContentView.onShow when lunching content shell and test shell
In the onStart callback of the activity we do not have a view yet in case
the activity lunched the first time or when it is coming back from background
and it was terminated by the os. This CL makes sure we issue onShow when
finishing initialization.
BUG=345425
Review URL: https://codereview.chromium.org/165993008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253417 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/android/testshell/java/src/org/chromium/chrome/testshell/TabManager.java | 1 | ||||
-rw-r--r-- | content/shell/android/java/src/org/chromium/content_shell/Shell.java | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/chrome/android/testshell/java/src/org/chromium/chrome/testshell/TabManager.java b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/TabManager.java index b4e1c8f..d475b83 100644 --- a/chrome/android/testshell/java/src/org/chromium/chrome/testshell/TabManager.java +++ b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/TabManager.java @@ -118,5 +118,6 @@ public class TabManager extends LinearLayout { mContentViewHolder.addView(mCurrentTab.getContentView()); mContentViewRenderView.setCurrentContentView(mCurrentTab.getContentView()); mCurrentTab.getContentView().requestFocus(); + mCurrentTab.getContentView().onShow(); } } 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 5e21dc0..5ac955f 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 @@ -252,6 +252,7 @@ public class Shell extends LinearLayout { private void initFromNativeTabContents(long nativeTabContents) { mContentView = ContentView.newInstance(getContext(), nativeTabContents, mWindow); mContentView.setContentViewClient(mContentViewClient); + if (getParent() != null) mContentView.onShow(); if (mContentView.getUrl() != null) mUrlTextView.setText(mContentView.getUrl()); ((FrameLayout) findViewById(R.id.contentview_holder)).addView(mContentView, new FrameLayout.LayoutParams( |