Index: content/browser/accessibility/accessibility_ui.cc |
diff --git a/content/browser/accessibility/accessibility_ui.cc b/content/browser/accessibility/accessibility_ui.cc |
index d519d1c4fd924833e0fe559a3afe63f2512f60e6..7655046a8caf92f29efa274e4adf9c3df51be7f4 100644 |
--- a/content/browser/accessibility/accessibility_ui.cc |
+++ b/content/browser/accessibility/accessibility_ui.cc |
@@ -94,28 +94,21 @@ void SendTargetsData( |
const WebUIDataSource::GotDataCallback& callback) { |
scoped_ptr<ListValue> rvh_list(new ListValue()); |
- for (RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator()); |
- !it.IsAtEnd(); it.Advance()) { |
- RenderProcessHost* render_process_host = it.GetCurrentValue(); |
- DCHECK(render_process_host); |
- |
+ RenderWidgetHost::List widgets = RenderWidgetHost::GetRenderWidgetHosts(); |
+ for (RenderWidgetHost::List::const_iterator it = widgets.begin(); |
+ it != widgets.end(); ++it) { |
jam
2013/06/12 19:59:59
ditto
nasko
2013/06/12 21:18:59
Done.
|
+ const RenderWidgetHost* widget = *it; |
// Ignore processes that don't have a connection, such as crashed tabs. |
- if (!render_process_host->HasConnection()) |
+ if (!widget->GetProcess()->HasConnection()) |
continue; |
- RenderProcessHost::RenderWidgetHostsIterator rwh_it( |
- render_process_host->GetRenderWidgetHostsIterator()); |
- for (; !rwh_it.IsAtEnd(); rwh_it.Advance()) { |
- const RenderWidgetHost* rwh = rwh_it.GetCurrentValue(); |
- DCHECK(rwh); |
- if (!rwh || !rwh->IsRenderView()) |
+ if (!widget->IsRenderView()) |
continue; |
- RenderViewHost* rvh = |
- RenderViewHost::From(const_cast<RenderWidgetHost*>(rwh)); |
+ RenderViewHost* rvh = |
+ RenderViewHost::From(const_cast<RenderWidgetHost*>(widget)); |
- rvh_list->Append(BuildTargetDescriptor(rvh)); |
- } |
+ rvh_list->Append(BuildTargetDescriptor(rvh)); |
} |
scoped_ptr<DictionaryValue> data(new DictionaryValue()); |