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 3647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3658 RenderViewNavigatedToHost(GURL(GetLoadingUrl(frame)).host(), | 3658 RenderViewNavigatedToHost(GURL(GetLoadingUrl(frame)).host(), |
3659 g_view_map.Get().size()); | 3659 g_view_map.Get().size()); |
3660 } | 3660 } |
3661 } | 3661 } |
3662 } | 3662 } |
3663 | 3663 |
3664 void RenderViewImpl::didClearWindowObject(WebFrame* frame) { | 3664 void RenderViewImpl::didClearWindowObject(WebFrame* frame) { |
3665 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3665 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
3666 DidClearWindowObject(frame)); | 3666 DidClearWindowObject(frame)); |
3667 | 3667 |
3668 if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION) | 3668 if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION) { |
3669 DomAutomationController::Install(frame); | 3669 if (!dom_automation_controller_) |
| 3670 dom_automation_controller_.reset(new DomAutomationController()); |
| 3671 dom_automation_controller_->set_message_sender( |
| 3672 static_cast<RenderView*>(this)); |
| 3673 dom_automation_controller_->set_routing_id(routing_id()); |
| 3674 dom_automation_controller_->BindToJavascript(frame, |
| 3675 "domAutomationController"); |
| 3676 } |
3670 | 3677 |
3671 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) | 3678 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) |
3672 StatsCollectionController::Install(frame); | 3679 StatsCollectionController::Install(frame); |
3673 } | 3680 } |
3674 | 3681 |
3675 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { | 3682 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { |
3676 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3683 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
3677 DidCreateDocumentElement(frame)); | 3684 DidCreateDocumentElement(frame)); |
3678 } | 3685 } |
3679 | 3686 |
3680 void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, | 3687 void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, |
3681 WebTextDirection direction) { | 3688 WebTextDirection direction) { |
3682 UpdateTitle(frame, title, direction); | 3689 UpdateTitle(frame, title, direction); |
(...skipping 2690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6373 for (size_t i = 0; i < icon_urls.size(); i++) { | 6380 for (size_t i = 0; i < icon_urls.size(); i++) { |
6374 WebURL url = icon_urls[i].iconURL(); | 6381 WebURL url = icon_urls[i].iconURL(); |
6375 if (!url.isEmpty()) | 6382 if (!url.isEmpty()) |
6376 urls.push_back(FaviconURL(url, | 6383 urls.push_back(FaviconURL(url, |
6377 ToFaviconType(icon_urls[i].iconType()))); | 6384 ToFaviconType(icon_urls[i].iconType()))); |
6378 } | 6385 } |
6379 SendUpdateFaviconURL(urls); | 6386 SendUpdateFaviconURL(urls); |
6380 } | 6387 } |
6381 | 6388 |
6382 } // namespace content | 6389 } // namespace content |
OLD | NEW |