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

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 2782003: Revert 49339 - Enable renderer accessibility by default.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 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
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents.cc
===================================================================
--- chrome/browser/tab_contents/tab_contents.cc (revision 49342)
+++ chrome/browser/tab_contents/tab_contents.cc (working copy)
@@ -296,6 +296,7 @@
opener_dom_ui_type_(DOMUIFactory::kNoDOMUI),
language_state_(&controller_),
geolocation_settings_state_(profile),
+ requested_accessibility_tree_(false),
closed_by_user_gesture_(false) {
ClearBlockedContentSettings();
renderer_preferences_util::UpdateFromSystemSettings(
@@ -354,6 +355,10 @@
// Set-up the showing of the omnibox search infobar if applicable.
if (OmniboxSearchHint::IsEnabled(profile))
omnibox_search_hint_.reset(new OmniboxSearchHint(this));
+
+ renderer_accessible_ =
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableRendererAccessibility);
}
TabContents::~TabContents() {
@@ -2142,8 +2147,10 @@
void TabContents::DocumentLoadedInFrame() {
controller_.DocumentLoadedInFrame();
-
- render_view_host()->SetDocumentLoaded(true);
+ if (renderer_accessible_ && !requested_accessibility_tree_) {
+ render_view_host()->RequestAccessibilityTree();
+ requested_accessibility_tree_ = true;
+ }
}
void TabContents::OnContentBlocked(ContentSettingsType type) {
@@ -2313,7 +2320,7 @@
const ViewHostMsg_FrameNavigate_Params& params) {
int extra_invalidate_flags = 0;
- render_view_host()->SetDocumentLoaded(false);
+ requested_accessibility_tree_ = false;
if (PageTransition::IsMainFrame(params.transition)) {
bool was_bookmark_bar_visible = ShouldShowBookmarkBar();
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698