Chromium Code Reviews| 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 3636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3647 RenderViewNavigatedToHost(GURL(GetLoadingUrl(frame)).host(), | 3647 RenderViewNavigatedToHost(GURL(GetLoadingUrl(frame)).host(), |
| 3648 g_view_map.Get().size()); | 3648 g_view_map.Get().size()); |
| 3649 } | 3649 } |
| 3650 } | 3650 } |
| 3651 } | 3651 } |
| 3652 | 3652 |
| 3653 void RenderViewImpl::didClearWindowObject(WebFrame* frame, int world_id) { | 3653 void RenderViewImpl::didClearWindowObject(WebFrame* frame, int world_id) { |
| 3654 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3654 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 3655 DidClearWindowObject(frame, world_id)); | 3655 DidClearWindowObject(frame, world_id)); |
| 3656 | 3656 |
| 3657 if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION) { | 3657 if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION && world_id == 0) |
|
Mike West
2014/01/13 11:41:35
Bitwise AND binds tighter than logical AND? I hope
| |
| 3658 if (!dom_automation_controller_) | 3658 DomAutomationController::Install(frame); |
| 3659 dom_automation_controller_.reset(new DomAutomationController()); | |
| 3660 dom_automation_controller_->set_message_sender( | |
| 3661 static_cast<RenderView*>(this)); | |
| 3662 dom_automation_controller_->set_routing_id(routing_id()); | |
| 3663 dom_automation_controller_->BindToJavascript(frame, | |
| 3664 "domAutomationController"); | |
| 3665 } | |
| 3666 | 3659 |
| 3667 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) | 3660 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) |
| 3668 StatsCollectionController::Install(frame); | 3661 StatsCollectionController::Install(frame); |
| 3669 } | 3662 } |
| 3670 | 3663 |
| 3671 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { | 3664 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { |
| 3672 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3665 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 3673 DidCreateDocumentElement(frame)); | 3666 DidCreateDocumentElement(frame)); |
| 3674 } | 3667 } |
| 3675 | 3668 |
| 3676 void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, | 3669 void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, |
| 3677 WebTextDirection direction) { | 3670 WebTextDirection direction) { |
| 3678 UpdateTitle(frame, title, direction); | 3671 UpdateTitle(frame, title, direction); |
| (...skipping 2690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6369 for (size_t i = 0; i < icon_urls.size(); i++) { | 6362 for (size_t i = 0; i < icon_urls.size(); i++) { |
| 6370 WebURL url = icon_urls[i].iconURL(); | 6363 WebURL url = icon_urls[i].iconURL(); |
| 6371 if (!url.isEmpty()) | 6364 if (!url.isEmpty()) |
| 6372 urls.push_back(FaviconURL(url, | 6365 urls.push_back(FaviconURL(url, |
| 6373 ToFaviconType(icon_urls[i].iconType()))); | 6366 ToFaviconType(icon_urls[i].iconType()))); |
| 6374 } | 6367 } |
| 6375 SendUpdateFaviconURL(urls); | 6368 SendUpdateFaviconURL(urls); |
| 6376 } | 6369 } |
| 6377 | 6370 |
| 6378 } // namespace content | 6371 } // namespace content |
| OLD | NEW |