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 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2863 return NULL; | 2863 return NULL; |
2864 return new RendererWebApplicationCacheHostImpl( | 2864 return new RendererWebApplicationCacheHostImpl( |
2865 FromWebView(frame->view()), client, | 2865 FromWebView(frame->view()), client, |
2866 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 2866 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
2867 } | 2867 } |
2868 | 2868 |
2869 WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { | 2869 WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { |
2870 return &cookie_jar_; | 2870 return &cookie_jar_; |
2871 } | 2871 } |
2872 | 2872 |
| 2873 void RenderViewImpl::didAccessInitialDocument(WebFrame* frame) { |
| 2874 // Notify the browser process that it is no longer safe to show the pending |
| 2875 // URL of the main frame, since a URL spoof is now possible. |
| 2876 if (!frame->parent() && page_id_ == -1) |
| 2877 Send(new ViewHostMsg_DidAccessInitialDocument(routing_id_)); |
| 2878 } |
| 2879 |
2873 void RenderViewImpl::didCreateFrame(WebFrame* parent, WebFrame* child) { | 2880 void RenderViewImpl::didCreateFrame(WebFrame* parent, WebFrame* child) { |
2874 Send(new ViewHostMsg_FrameAttached(routing_id_, parent->identifier(), | 2881 Send(new ViewHostMsg_FrameAttached(routing_id_, parent->identifier(), |
2875 child->identifier(), UTF16ToUTF8(child->assignedName()))); | 2882 child->identifier(), UTF16ToUTF8(child->assignedName()))); |
2876 } | 2883 } |
2877 | 2884 |
2878 void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { | 2885 void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { |
2879 // We only need to notify the browser if the active, top-level frame clears | 2886 // We only need to notify the browser if the active, top-level frame clears |
2880 // its opener. We can ignore cases where a swapped out frame clears its | 2887 // its opener. We can ignore cases where a swapped out frame clears its |
2881 // opener after hearing about it from the browser, and the browser does not | 2888 // opener after hearing about it from the browser, and the browser does not |
2882 // (yet) care about subframe openers. | 2889 // (yet) care about subframe openers. |
(...skipping 3764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6647 WebURL url = icon_urls[i].iconURL(); | 6654 WebURL url = icon_urls[i].iconURL(); |
6648 if (!url.isEmpty()) | 6655 if (!url.isEmpty()) |
6649 urls.push_back(FaviconURL(url, | 6656 urls.push_back(FaviconURL(url, |
6650 ToFaviconType(icon_urls[i].iconType()))); | 6657 ToFaviconType(icon_urls[i].iconType()))); |
6651 } | 6658 } |
6652 SendUpdateFaviconURL(urls); | 6659 SendUpdateFaviconURL(urls); |
6653 } | 6660 } |
6654 | 6661 |
6655 | 6662 |
6656 } // namespace content | 6663 } // namespace content |
OLD | NEW |