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

Side by Side Diff: content/renderer/render_frame_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/common/view_messages.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 DocumentState::FromDataSource(frame->dataSource())); 1325 DocumentState::FromDataSource(frame->dataSource()));
1326 int provider_id = provider ? 1326 int provider_id = provider ?
1327 provider->provider_id() : 1327 provider->provider_id() :
1328 kInvalidServiceWorkerProviderId; 1328 kInvalidServiceWorkerProviderId;
1329 return new WebServiceWorkerProviderImpl( 1329 return new WebServiceWorkerProviderImpl(
1330 ChildThread::current()->thread_safe_sender(), provider_id); 1330 ChildThread::current()->thread_safe_sender(), provider_id);
1331 } 1331 }
1332 1332
1333 void RenderFrameImpl::didAccessInitialDocument(blink::WebLocalFrame* frame) { 1333 void RenderFrameImpl::didAccessInitialDocument(blink::WebLocalFrame* frame) {
1334 DCHECK(!frame_ || frame_ == frame); 1334 DCHECK(!frame_ || frame_ == frame);
1335 render_view_->didAccessInitialDocument(frame); 1335 // Notify the browser process that it is no longer safe to show the pending
1336 // URL of the main frame, since a URL spoof is now possible.
1337 if (!frame->parent() && render_view_->page_id_ == -1)
1338 Send(new FrameHostMsg_DidAccessInitialDocument(routing_id_));
1336 } 1339 }
1337 1340
1338 blink::WebFrame* RenderFrameImpl::createChildFrame( 1341 blink::WebFrame* RenderFrameImpl::createChildFrame(
1339 blink::WebLocalFrame* parent, 1342 blink::WebLocalFrame* parent,
1340 const blink::WebString& name) { 1343 const blink::WebString& name) {
1341 // Synchronously notify the browser of a child frame creation to get the 1344 // Synchronously notify the browser of a child frame creation to get the
1342 // routing_id for the RenderFrame. 1345 // routing_id for the RenderFrame.
1343 int child_routing_id = MSG_ROUTING_NONE; 1346 int child_routing_id = MSG_ROUTING_NONE;
1344 Send(new FrameHostMsg_CreateChildFrame(routing_id_, 1347 Send(new FrameHostMsg_CreateChildFrame(routing_id_,
1345 base::UTF16ToUTF8(name), 1348 base::UTF16ToUTF8(name),
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
3178 selection_text_offset_ = offset; 3181 selection_text_offset_ = offset;
3179 selection_range_ = range; 3182 selection_range_ = range;
3180 // This IPC is dispatched by RenderWidetHost, so use its routing ID. 3183 // This IPC is dispatched by RenderWidetHost, so use its routing ID.
3181 Send(new ViewHostMsg_SelectionChanged( 3184 Send(new ViewHostMsg_SelectionChanged(
3182 GetRenderWidget()->routing_id(), text, offset, range)); 3185 GetRenderWidget()->routing_id(), text, offset, range));
3183 } 3186 }
3184 GetRenderWidget()->UpdateSelectionBounds(); 3187 GetRenderWidget()->UpdateSelectionBounds();
3185 } 3188 }
3186 3189
3187 } // namespace content 3190 } // namespace content
OLDNEW
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698