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 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2735 return NULL; | 2735 return NULL; |
2736 return new RendererWebApplicationCacheHostImpl( | 2736 return new RendererWebApplicationCacheHostImpl( |
2737 FromWebView(frame->view()), client, | 2737 FromWebView(frame->view()), client, |
2738 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 2738 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
2739 } | 2739 } |
2740 | 2740 |
2741 WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { | 2741 WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { |
2742 return &cookie_jar_; | 2742 return &cookie_jar_; |
2743 } | 2743 } |
2744 | 2744 |
| 2745 void RenderViewImpl::didAccessInitialDocument(WebFrame* frame) { |
| 2746 // Notify the browser process that it is no longer safe to show the pending |
| 2747 // URL of the main frame, since a URL spoof is now possible. |
| 2748 if (!frame->parent() && page_id_ == -1) |
| 2749 Send(new ViewHostMsg_DidAccessInitialDocument(routing_id_)); |
| 2750 } |
| 2751 |
2745 void RenderViewImpl::didCreateFrame(WebFrame* parent, WebFrame* child) { | 2752 void RenderViewImpl::didCreateFrame(WebFrame* parent, WebFrame* child) { |
2746 if (!updating_frame_tree_) | 2753 if (!updating_frame_tree_) |
2747 SendUpdatedFrameTree(NULL); | 2754 SendUpdatedFrameTree(NULL); |
2748 } | 2755 } |
2749 | 2756 |
2750 void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { | 2757 void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { |
2751 // We should only hear this from the top-level frame, because subframes do not | 2758 // We should only hear this from the top-level frame, because subframes do not |
2752 // have openers. | 2759 // have openers. |
2753 CHECK(!frame->parent()); | 2760 CHECK(!frame->parent()); |
2754 | 2761 |
(...skipping 3768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6523 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6530 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6524 RenderProcess::current()->ReleaseTransportDIB(dib); | 6531 RenderProcess::current()->ReleaseTransportDIB(dib); |
6525 } | 6532 } |
6526 | 6533 |
6527 void RenderViewImpl::DidCommitCompositorFrame() { | 6534 void RenderViewImpl::DidCommitCompositorFrame() { |
6528 RenderWidget::DidCommitCompositorFrame(); | 6535 RenderWidget::DidCommitCompositorFrame(); |
6529 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); | 6536 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); |
6530 } | 6537 } |
6531 | 6538 |
6532 } // namespace content | 6539 } // namespace content |
OLD | NEW |