Update accessibility mode when image labeling pref changes

crrev.com/c/1394314 introduced a new user preference for
image labeling, and subsequent changes added UI to allow
the user to enable it. crrev.com/c/1466025 introduced an
accessibility mode for a renderer with image labeling
enabled, and a way for the renderer to annotate the
accessibility tree with image labels.

This change hooks these pieces together by setting the
image labeling accessibility mode on all relevant tab
contents when the corresponding pref is set.

Bug: 905419

Change-Id: Ifcc528fc49109d5c64684b5a60142a34fca0ddbe
Reviewed-on: https://chromium-review.googlesource.com/c/1462658
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Nektarios Paisios <[email protected]>
Commit-Queue: Dominic Mazzoni <[email protected]>
Cr-Commit-Position: refs/heads/master@{#631805}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 4c68f6e..613d5ff1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -42,7 +42,6 @@
 #include "components/url_formatter/url_formatter.h"
 #include "content/browser/accessibility/accessibility_tree_formatter.h"
 #include "content/browser/accessibility/accessibility_tree_formatter_blink.h"
-#include "content/browser/accessibility/browser_accessibility_state_impl.h"
 #include "content/browser/bad_message.h"
 #include "content/browser/browser_main_loop.h"
 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
@@ -589,7 +588,8 @@
       force_disable_overscroll_content_(false),
       last_dialog_suppressed_(false),
       accessibility_mode_(
-          BrowserAccessibilityStateImpl::GetInstance()->GetAccessibilityMode()),
+          GetContentClient()->browser()->GetAXModeForBrowserContext(
+              browser_context)),
       audio_stream_monitor_(this),
       bluetooth_connected_device_count_(0),
       media_device_group_id_salt_base_(