diff options
author | powei@chromium.org <powei@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 21:35:28 +0000 |
---|---|---|
committer | powei@chromium.org <powei@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 21:35:28 +0000 |
commit | aca40ac4bc4e982a4af75ff2a80ab835382f1af1 (patch) | |
tree | 54d34f9f7dcde1acac9c38e1e5a7a4ffc5d66d4f /content/shell | |
parent | 970ef672c27db5232ce3a4f5766a6aa35435f3ec (diff) | |
download | chromium_src-aca40ac4bc4e982a4af75ff2a80ab835382f1af1.zip chromium_src-aca40ac4bc4e982a4af75ff2a80ab835382f1af1.tar.gz chromium_src-aca40ac4bc4e982a4af75ff2a80ab835382f1af1.tar.bz2 |
Adding compositor callbacks to RenderWidgetHostViewAndroid
The coupling between the compositor and the RenderWidgetHostViewAndroid (RWHVA)
is weak. This causes problem such as when RWHVA needs to act on a compositor
commit (as in the current DidCommitFrameData callback).
We create a WindowAndroidObserver class and add a list of observers to the
android window, which then forwards the callbacks from the compositor to the
observers.
android= https://gerrit-int.chromium.org/#/c/44978/
BUG=273250
Review URL: https://codereview.chromium.org/26753005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r-- | content/shell/android/java/src/org/chromium/content_shell/ShellManager.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java b/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java index a7e3037..c112ede 100644 --- a/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java +++ b/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java @@ -37,7 +37,15 @@ public class ShellManager extends FrameLayout { public ShellManager(Context context, AttributeSet attrs) { super(context, attrs); nativeInit(this); - mContentViewRenderView = new ContentViewRenderView(context) { + } + + /** + * @param window The window used to generate all shells. + */ + public void setWindow(WindowAndroid window) { + assert window != null; + mWindow = window; + mContentViewRenderView = new ContentViewRenderView(getContext(), window) { @Override protected void onReadyToRender() { if (sStartup) { @@ -49,13 +57,6 @@ public class ShellManager extends FrameLayout { } /** - * @param window The window used to generate all shells. - */ - public void setWindow(WindowAndroid window) { - mWindow = window; - } - - /** * @return The window used to generate all shells. */ public WindowAndroid getWindow() { @@ -87,6 +88,7 @@ public class ShellManager extends FrameLayout { @SuppressWarnings("unused") @CalledByNative private Object createShell() { + assert mContentViewRenderView != null; LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); Shell shellView = (Shell) inflater.inflate(R.layout.shell_view, null); |