Allow the IAccessible parent to be known late in the game.

In the case of a tab loading in the background, accessibility
notifications may arrive from the renderer before the tab's WebContents
is added to a WebView. In this case, the accessible parent isn't yet
known. Handle this case by allowing the RWHVA's
BrowserAccessibilityManager to be created without an accessible parent
and then receive that parent (from a WebContentsImpl) when the
WebContents is finally attached to a WebView.

BUG=242524
[email protected]

Review URL: https://chromiumcodereview.appspot.com/15744014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202247 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 4d9f4cca..8cf86dc2 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -893,6 +893,8 @@
 void WebContentsImpl::SetParentNativeViewAccessible(
 gfx::NativeViewAccessible accessible_parent) {
   accessible_parent_ = accessible_parent;
+  if (GetRenderViewHost())
+    GetRenderViewHostImpl()->SetParentNativeViewAccessible(accessible_parent);
 }
 #endif