| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 3618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3629 RenderViewNavigatedToHost(GURL(GetLoadingUrl(frame)).host(), | 3629 RenderViewNavigatedToHost(GURL(GetLoadingUrl(frame)).host(), |
| 3630 g_view_map.Get().size()); | 3630 g_view_map.Get().size()); |
| 3631 } | 3631 } |
| 3632 } | 3632 } |
| 3633 } | 3633 } |
| 3634 | 3634 |
| 3635 void RenderViewImpl::didClearWindowObject(WebFrame* frame, int world_id) { | 3635 void RenderViewImpl::didClearWindowObject(WebFrame* frame, int world_id) { |
| 3636 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3636 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 3637 DidClearWindowObject(frame, world_id)); | 3637 DidClearWindowObject(frame, world_id)); |
| 3638 | 3638 |
| 3639 if ((enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION) && (world_id == 0)) | 3639 // Only install controllers into the main world. |
| 3640 if (!world_id) |
| 3641 return; |
| 3642 |
| 3643 if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION)) |
| 3640 DomAutomationController::Install(this, frame); | 3644 DomAutomationController::Install(this, frame); |
| 3641 | 3645 |
| 3642 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) | 3646 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) |
| 3643 StatsCollectionController::Install(frame); | 3647 StatsCollectionController::Install(frame); |
| 3644 } | 3648 } |
| 3645 | 3649 |
| 3646 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { | 3650 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { |
| 3647 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3651 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 3648 DidCreateDocumentElement(frame)); | 3652 DidCreateDocumentElement(frame)); |
| 3649 } | 3653 } |
| (...skipping 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6227 for (size_t i = 0; i < icon_urls.size(); i++) { | 6231 for (size_t i = 0; i < icon_urls.size(); i++) { |
| 6228 WebURL url = icon_urls[i].iconURL(); | 6232 WebURL url = icon_urls[i].iconURL(); |
| 6229 if (!url.isEmpty()) | 6233 if (!url.isEmpty()) |
| 6230 urls.push_back(FaviconURL(url, | 6234 urls.push_back(FaviconURL(url, |
| 6231 ToFaviconType(icon_urls[i].iconType()))); | 6235 ToFaviconType(icon_urls[i].iconType()))); |
| 6232 } | 6236 } |
| 6233 SendUpdateFaviconURL(urls); | 6237 SendUpdateFaviconURL(urls); |
| 6234 } | 6238 } |
| 6235 | 6239 |
| 6236 } // namespace content | 6240 } // namespace content |
| OLD | NEW |