Chromium Code Reviews| Index: content/browser/web_contents/web_contents_impl.cc |
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
| index a6a7c488357c29203be043f2c9003eb563eb9353..e15b67cd10d93bb665bf318f4b1b871c554fcd34 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -2502,6 +2502,11 @@ void WebContentsImpl::DidFailProvisionalLoadWithError( |
| validated_url, |
| params.error_code, |
| params.error_description)); |
| + |
| + BrowserAccessibilityManager* manager = |
|
nasko
2015/02/03 17:28:05
nit: wrong indent.
dmazzoni
2015/02/04 20:56:06
Done.
|
| + render_frame_host->browser_accessibility_manager(); |
| + if (manager) |
| + manager->NavigationFailed(); |
| } |
| void WebContentsImpl::DidFailLoadWithError( |
| @@ -2538,6 +2543,16 @@ void WebContentsImpl::DidStartNavigationToPendingEntry( |
| WebContentsObserver, |
| observers_, |
| DidStartNavigationToPendingEntry(url, reload_type)); |
| + |
| + // Notify accessibility that the user is navigating away from the |
| + // current RenderFrameHost. |
| + FrameTreeNode* ftn = render_frame_host->frame_tree_node(); |
|
dmazzoni
2015/01/21 18:59:04
This is the only function that gets called early e
nasko
2015/02/03 17:28:05
Architecturally, we can't notify before commit tim
dmazzoni
2015/02/03 17:40:54
What I'm observing is that for a browser-initiated
nasko
2015/02/03 18:05:18
What you are observing is correct for this very sp
dmazzoni
2015/02/03 18:20:27
That's true.
The point is that I need a notificat
|
| + BrowserAccessibilityManager* manager = |
| + ftn->current_frame_host()->browser_accessibility_manager(); |
| + if (manager) { |
| + bool is_reload = reload_type != NavigationController::NO_RELOAD; |
| + manager->UserIsNavigatingAway(is_reload); |
| + } |
| } |
| void WebContentsImpl::RequestOpenURL(RenderFrameHostImpl* render_frame_host, |
| @@ -2576,6 +2591,11 @@ void WebContentsImpl::DidCommitProvisionalLoad( |
| observers_, |
| DidCommitProvisionalLoadForFrame( |
| render_frame_host, url, transition_type)); |
| + |
| + BrowserAccessibilityManager* manager = |
| + render_frame_host->browser_accessibility_manager(); |
| + if (manager) |
| + manager->NavigationSucceeded(); |
| } |
| void WebContentsImpl::DidNavigateMainFramePreCommit( |