Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 136533002: Reland 244394 - Convert DomAutomationController from CppBoundClass to... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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))
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
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
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698