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 if (!dom_automation_controller_) | 3669 DomAutomationController::Install(frame); |
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 } | |
3677 | 3670 |
3678 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) | 3671 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) |
3679 StatsCollectionController::Install(frame); | 3672 StatsCollectionController::Install(frame); |
3680 } | 3673 } |
3681 | 3674 |
3682 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { | 3675 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { |
3683 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3676 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
3684 DidCreateDocumentElement(frame)); | 3677 DidCreateDocumentElement(frame)); |
3685 } | 3678 } |
3686 | 3679 |
3687 void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, | 3680 void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, |
3688 WebTextDirection direction) { | 3681 WebTextDirection direction) { |
3689 UpdateTitle(frame, title, direction); | 3682 UpdateTitle(frame, title, direction); |
(...skipping 2690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6380 for (size_t i = 0; i < icon_urls.size(); i++) { | 6373 for (size_t i = 0; i < icon_urls.size(); i++) { |
6381 WebURL url = icon_urls[i].iconURL(); | 6374 WebURL url = icon_urls[i].iconURL(); |
6382 if (!url.isEmpty()) | 6375 if (!url.isEmpty()) |
6383 urls.push_back(FaviconURL(url, | 6376 urls.push_back(FaviconURL(url, |
6384 ToFaviconType(icon_urls[i].iconType()))); | 6377 ToFaviconType(icon_urls[i].iconType()))); |
6385 } | 6378 } |
6386 SendUpdateFaviconURL(urls); | 6379 SendUpdateFaviconURL(urls); |
6387 } | 6380 } |
6388 | 6381 |
6389 } // namespace content | 6382 } // namespace content |
OLD | NEW |