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

Unified Diff: content/browser/accessibility/accessibility_ui.cc

Issue 2544993002: Avoid enabling accessibility for WebContents that are never shown (Closed)
Patch Set: Get rid of 'extension' from content code Created 4 years 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 | « no previous file | content/browser/frame_host/interstitial_page_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/accessibility_ui.cc
diff --git a/content/browser/accessibility/accessibility_ui.cc b/content/browser/accessibility/accessibility_ui.cc
index 20f041767eeb25c41d39d559bb4e07836e67f354..60e7689fff4f85281a151dc4f5806e4ecb23a21a 100644
--- a/content/browser/accessibility/accessibility_ui.cc
+++ b/content/browser/accessibility/accessibility_ui.cc
@@ -16,6 +16,7 @@
#include "content/browser/accessibility/accessibility_tree_formatter_blink.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/accessibility/browser_accessibility_state_impl.h"
+#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/browser/web_contents/web_contents_impl.h"
@@ -116,6 +117,9 @@ bool HandleRequestCallback(BrowserContext* current_context,
RenderViewHost* rvh = RenderViewHost::From(widget);
if (!rvh)
continue;
+ // Ignore views that are never visible, like background pages.
+ if (static_cast<RenderViewHostImpl*>(rvh)->GetDelegate()->IsNeverVisible())
+ continue;
BrowserContext* context = rvh->GetProcess()->GetBrowserContext();
if (context != current_context)
continue;
« no previous file with comments | « no previous file | content/browser/frame_host/interstitial_page_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698