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 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2767 return NULL; | 2767 return NULL; |
2768 return new RendererWebApplicationCacheHostImpl( | 2768 return new RendererWebApplicationCacheHostImpl( |
2769 FromWebView(frame->view()), client, | 2769 FromWebView(frame->view()), client, |
2770 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 2770 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
2771 } | 2771 } |
2772 | 2772 |
2773 WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { | 2773 WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { |
2774 return &cookie_jar_; | 2774 return &cookie_jar_; |
2775 } | 2775 } |
2776 | 2776 |
| 2777 void RenderViewImpl::didAccessInitialDocument(WebFrame* frame) { |
| 2778 // Notify the browser process that it is no longer safe to show the pending |
| 2779 // URL of the main frame, since a URL spoof is now possible. |
| 2780 if (!frame->parent() && page_id_ == -1) |
| 2781 Send(new ViewHostMsg_DidAccessInitialDocument(routing_id_)); |
| 2782 } |
| 2783 |
2777 void RenderViewImpl::didCreateFrame(WebFrame* parent, WebFrame* child) { | 2784 void RenderViewImpl::didCreateFrame(WebFrame* parent, WebFrame* child) { |
2778 if (!updating_frame_tree_) | 2785 if (!updating_frame_tree_) |
2779 SendUpdatedFrameTree(NULL); | 2786 SendUpdatedFrameTree(NULL); |
2780 } | 2787 } |
2781 | 2788 |
2782 void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { | 2789 void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { |
2783 // We only need to notify the browser if the active, top-level frame clears | 2790 // We only need to notify the browser if the active, top-level frame clears |
2784 // its opener. We can ignore cases where a swapped out frame clears its | 2791 // its opener. We can ignore cases where a swapped out frame clears its |
2785 // opener after hearing about it from the browser, and the browser does not | 2792 // opener after hearing about it from the browser, and the browser does not |
2786 // (yet) care about subframe openers. | 2793 // (yet) care about subframe openers. |
(...skipping 3835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6622 WebURL url = icon_urls[i].iconURL(); | 6629 WebURL url = icon_urls[i].iconURL(); |
6623 if (!url.isEmpty()) | 6630 if (!url.isEmpty()) |
6624 urls.push_back(FaviconURL(url, | 6631 urls.push_back(FaviconURL(url, |
6625 ToFaviconType(icon_urls[i].iconType()))); | 6632 ToFaviconType(icon_urls[i].iconType()))); |
6626 } | 6633 } |
6627 SendUpdateFaviconURL(urls); | 6634 SendUpdateFaviconURL(urls); |
6628 } | 6635 } |
6629 | 6636 |
6630 | 6637 |
6631 } // namespace content | 6638 } // namespace content |
OLD | NEW |