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

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

Issue 251823002: Move didAccessInitialDocument to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 7 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 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after
2061 WebMediaPlayerParams params( 2061 WebMediaPlayerParams params(
2062 base::Bind(&ContentRendererClient::DeferMediaLoad, 2062 base::Bind(&ContentRendererClient::DeferMediaLoad,
2063 base::Unretained(GetContentClient()->renderer()), 2063 base::Unretained(GetContentClient()->renderer()),
2064 static_cast<RenderFrame*>(render_frame)), 2064 static_cast<RenderFrame*>(render_frame)),
2065 RenderThreadImpl::current()->GetAudioRendererMixerManager()->CreateInput( 2065 RenderThreadImpl::current()->GetAudioRendererMixerManager()->CreateInput(
2066 routing_id_, render_frame->GetRoutingID())); 2066 routing_id_, render_frame->GetRoutingID()));
2067 return new WebMediaPlayerImpl(frame, client, AsWeakPtr(), params); 2067 return new WebMediaPlayerImpl(frame, client, AsWeakPtr(), params);
2068 #endif // defined(OS_ANDROID) 2068 #endif // defined(OS_ANDROID)
2069 } 2069 }
2070 2070
2071 void RenderViewImpl::didAccessInitialDocument(WebLocalFrame* frame) {
2072 // Notify the browser process that it is no longer safe to show the pending
2073 // URL of the main frame, since a URL spoof is now possible.
2074 if (!frame->parent() && page_id_ == -1)
2075 Send(new ViewHostMsg_DidAccessInitialDocument(routing_id_));
2076 }
2077
2078 void RenderViewImpl::didDisownOpener(blink::WebLocalFrame* frame) { 2071 void RenderViewImpl::didDisownOpener(blink::WebLocalFrame* frame) {
2079 // We only need to notify the browser if the active, top-level frame clears 2072 // We only need to notify the browser if the active, top-level frame clears
2080 // its opener. We can ignore cases where a swapped out frame clears its 2073 // its opener. We can ignore cases where a swapped out frame clears its
2081 // opener after hearing about it from the browser, and the browser does not 2074 // opener after hearing about it from the browser, and the browser does not
2082 // (yet) care about subframe openers. 2075 // (yet) care about subframe openers.
2083 if (is_swapped_out_ || frame->parent()) 2076 if (is_swapped_out_ || frame->parent())
2084 return; 2077 return;
2085 2078
2086 // Notify WebContents and all its swapped out RenderViews. 2079 // Notify WebContents and all its swapped out RenderViews.
2087 Send(new ViewHostMsg_DidDisownOpener(routing_id_)); 2080 Send(new ViewHostMsg_DidDisownOpener(routing_id_));
(...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after
4442 std::vector<gfx::Size> sizes; 4435 std::vector<gfx::Size> sizes;
4443 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4436 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4444 if (!url.isEmpty()) 4437 if (!url.isEmpty())
4445 urls.push_back( 4438 urls.push_back(
4446 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4439 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4447 } 4440 }
4448 SendUpdateFaviconURL(urls); 4441 SendUpdateFaviconURL(urls);
4449 } 4442 }
4450 4443
4451 } // namespace content 4444 } // 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