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 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2758 return NULL; | 2758 return NULL; |
2759 return new RendererWebApplicationCacheHostImpl( | 2759 return new RendererWebApplicationCacheHostImpl( |
2760 FromWebView(frame->view()), client, | 2760 FromWebView(frame->view()), client, |
2761 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 2761 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
2762 } | 2762 } |
2763 | 2763 |
2764 WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { | 2764 WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { |
2765 return &cookie_jar_; | 2765 return &cookie_jar_; |
2766 } | 2766 } |
2767 | 2767 |
2768 void RenderViewImpl::didAccessInitialDocument(WebFrame* frame) { | |
2769 // Notify the browser process that it is no longer safe to show the pending | |
2770 // URL of the main frame, since a URL spoof is now possible. | |
2771 if (!frame->parent() && page_id_ == -1) | |
2772 Send(new ViewHostMsg_DidAccessInitialDocument(routing_id_)); | |
2773 } | |
2774 | |
2775 void RenderViewImpl::didCreateFrame(WebFrame* parent, WebFrame* child) { | 2768 void RenderViewImpl::didCreateFrame(WebFrame* parent, WebFrame* child) { |
2776 } | 2769 } |
2777 | 2770 |
2778 void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { | 2771 void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { |
2779 // We only need to notify the browser if the active, top-level frame clears | 2772 // We only need to notify the browser if the active, top-level frame clears |
2780 // its opener. We can ignore cases where a swapped out frame clears its | 2773 // its opener. We can ignore cases where a swapped out frame clears its |
2781 // opener after hearing about it from the browser, and the browser does not | 2774 // opener after hearing about it from the browser, and the browser does not |
2782 // (yet) care about subframe openers. | 2775 // (yet) care about subframe openers. |
2783 if (is_swapped_out_ || frame->parent()) | 2776 if (is_swapped_out_ || frame->parent()) |
2784 return; | 2777 return; |
(...skipping 3725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6510 WebURL url = icon_urls[i].iconURL(); | 6503 WebURL url = icon_urls[i].iconURL(); |
6511 if (!url.isEmpty()) | 6504 if (!url.isEmpty()) |
6512 urls.push_back(FaviconURL(url, | 6505 urls.push_back(FaviconURL(url, |
6513 ToFaviconType(icon_urls[i].iconType()))); | 6506 ToFaviconType(icon_urls[i].iconType()))); |
6514 } | 6507 } |
6515 SendUpdateFaviconURL(urls); | 6508 SendUpdateFaviconURL(urls); |
6516 } | 6509 } |
6517 | 6510 |
6518 | 6511 |
6519 } // namespace content | 6512 } // namespace content |
OLD | NEW |